pandas · Lesson 2.5 · Pro
Sorting and top N
Sort by one or more columns and pull out the top or bottom rows.
In this lesson
- sort_values
- Sort by several columns
- nlargest and nsmallest
- Sorting puts missing values last
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.