Sorting

Sorting: Sorting and Top Lists.

Updated

  1. 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.