Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Filtering by row
Extracting data by column
Practice using filter() and select()
The pipe operator
Sorting rows
23. Sort data by row


Sometimes, we want to order filtered data in a certain way. The arrange() function allows us to sort row data by the values in a given column. If we wanted to sort our data by population, we'd write:

arrange(countries, population)


Sort the rows in countries by area.

Stuck? Here's a hint!


arrange(countries, area)