Learn

Recall our gradebook from the previous exercise:

student assignment_name grade
Amy Assignment 1 75
Amy Assignment 2 82
Bob Assignment 1 99
Bob Assignment 2 90
Chris Assignment 1 72
Chris Assignment 2 66

Suppose this data is stored in a Pandas DataFrame called df.

The same Seaborn command that you previously learned (sns.barplot()) will plot this data in a bar plot and automatically aggregate the data:

sns.barplot(data=df, x="student", y="grade")

In the example above, Seaborn will aggregate grades by student, and plot the average grade for each student.

Instructions

1.

Use Seaborn to plot the average grade for each assignment. Take a look at gradebook.csv for the column names.

2.

Use plt.show() to display the graph.

Sign up to start coding

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?