Autograder demo: Grading Pandas DataFrames

This question uses the built-in method, Feedback.check_dataframe() in code_feedback.py to check Pandas dataframes for correctness (special thanks to Wade Fagen-Ulmschneider!). By default, rows can be in any order as long as the correct data is present. There is also an option to display the student input in the feedback tab (using the display_input keyword argument, default false).

Create a Pandas DataFrame, df, that matches the following format:

  a b
0 1 3
1 2 4

2 rows x 2 columns

Your code snippet should define the following variables:

Name Type
df Pandas DataFrame
user_code.py

Correct answer

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Autograder demo: Grading Pandas DataFrames

Variant

Started at:
2026-09-19 09:11:29 (CDT)
Duration:
0s
Show/Hide answer
{}
History
dec frac
rad deg