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

  1. sort_values
  2. Sort by several columns
  3. nlargest and nsmallest
  4. Sorting puts missing values last