The DataFrameGroupBy should get a new method nlargest to allow selecting the N largest rows for each group.
Currently this is doable by using df.sort_values(...).groupby(...).head(n) but I want to use the keep='all' parameter of nlargest which cannot be obtained with head