import pandas as pd import numpy as np %matplotlib inline import matplotlib.pyplot as plt
raw_data = {'name': ['Willard Morris', 'Al Jennings', 'Omar Mullins', 'Spencer McDaniel'], 'age': [20, 19, 22, 21], 'favorite_color': ['blue', 'blue', 'yellow', "green"], 'grade': [88, 92, 95, 70]} df = pd.DataFrame(raw_data, index = ['Willard Morris', 'Al Jennings', 'Omar Mullins', 'Spencer McDaniel']) df
#filter the dataframe on student grades, so we can plot that variable df = df[['grade']] #set up the plot my_plot = df.plot(kind='bar',title="Student grades",figsize=(9, 7)) my_plot.set_ylabel('Grade')