Autumn Offers - hours only!Up to 80% off on all courses and bundles.-Close
What DataFrames are
DataFrame columns
DataFrame rows
Filtering rows and columns
Filtering data frames
Sorting rows
29. Ascending or descending order


Well done! By default, rows are sorted in ascending order. If you want to have them sorted in descending order, you need to write:

hospitals = hospitals.sort_values(by='Hospital overall rating', ascending=0)

In pandas, ascending=0 means "sort in descending order".


Now, which country has the greatest area in the EU? Sort the rows in eu_states by the Area column in descending order.

Stuck? Here's a hint!

Use ascending=0 in the parentheses.