O'Reilly logo
  • Bob McDonald thinks this is interesting:

Returning to the tipping dataset from before, suppose you wanted to select the top five tip_pct values by group. First, write a function that selects the rows with the largest values in a particular column:

From

Cover of Python for Data Analysis, 2nd Edition

Note

Currently selects smallest values