pandas.core.groupby.SeriesGroupBy.nlargest¶
Return the largest n elements.
- param n
- int, default 5
Return this many descending sorted values.
- param keep
- {‘first’, ‘last’, ‘all’}, default ‘first’
When there are duplicate values that cannot all fit in a Series of n elements:
first
return the first n occurrences in orderof appearance.
last
return the last n occurrences in reverseorder of appearance.
all
keep all occurrences. This can result in a Series ofsize larger than n.
- return
Series The n largest values in the Series, sorted in decreasing order.
Warning
This feature is currently unsupported by Intel Scalable Dataframe Compiler