How to select top 5 results per group in dataframe?

Thanks! It feels like the Julian way of doing things is to know which library to use :slight_smile:

Do you mean to use “df” or “sdf” on line 5?