9951 explained code solutions for 126 technologies

python-matplotlibHow to make bar chart from Pandas Dataframe

import matplotlib.pyplot as plt
import pandas as pd

data = {
  'iPhone.': [12, 900, 78],
  'Android': [204, 501, 800]

df = pd.DataFrame(data, index = ['some', 'metric', 'other'])


plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

import pandas as pd

load Pandas module

data = {

define data for data frame


create Pandas Dataframe from specified data

index =

specify column names


will plot Dataframe data as bar charts


render chart in a separate window