awkward icon indicating copy to clipboard operation
awkward copied to clipboard

Extending ak.max/min functionality to first N entries

Open andrzejnovak opened this issue 5 years ago • 2 comments

It would be convenient to have a function to get the first N highest/lowest entries as opposed to just the first max/min. From our side discussion, this could be ak.top/bottom.

andrzejnovak avatar Nov 20 '20 10:11 andrzejnovak

I labeled this "performance" because it's equivalent to sort-and-slice.

jpivarski avatar Dec 15 '20 13:12 jpivarski

It looks like Pandas calls this nlargest: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.nlargest.html

jpivarski avatar Aug 02 '21 16:08 jpivarski