# Sorting

Sorting: Sorting and Top Lists.

Updated: November 19, 2026

1. [Sorting and Top Lists](https://www.ask-codey.com/lessons/pandas-sorting-and-top-lists) (Apprentice): sort_values puts a table's rows in order by one column or several, with ascending= saying which way for each; nlargest and nsmallest give the top or bottom rows by a column in one call; and reset_index(drop=True) numbers a top list 0, 1, 2 instead of keeping the old row labels.

Source: https://www.ask-codey.com/courses/python-data-analysis/topics/data-sorting
