Structure the Data

To remind you of the task at hand and what output we expect:

To sort the rows you need .sort_values(), additionally you need to set the by and ascending parameters to specify the column to sort by and whether to sort in ascending order or not.

To get the top n rows you can use .head(n).

Last updated