LoslegenKostenlos loslegen

Student scores bar graph

The school board has asked you to come and look at some test scores. They want an easy way to visualize the scores of different students within a small class. This seems like a simple use case for practicing your bar chart skills!

In this exercise, you will help the school board team by creating a bar chart of school test score values.

A DataFrame student_scores has been provided. In this and all future exercises where it is needed, plotly.express has already been loaded as px.

Diese Übung ist Teil des Kurses

Introduction to Data Visualization with Plotly in Python

Kurs anzeigen

Anleitung zur Übung

  • Examine the head of the student_scores DataFrame that has been printed for you.
  • Create a bar plot, setting the y-axis to be the score and the x-axis to be the student name.
  • Add a title to the plot: call it "Student Scores by Student".

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create the bar plot
fig = px.bar(data_frame=____, 
             x="____", 
             y="____", 
             ____="____")

# Show the plot
fig.show()
Code bearbeiten und ausführen