SeriesGroupBy.nlargest
pandas.core.groupby.SeriesGroupBy.nlargest
-
SeriesGroupBy.nlargest
-
Return the largest
n
elements.Parameters: n : int
Return this many descending sorted values
-
keep : {‘first’, ‘last’, False}, default ‘first’
-
Where there are duplicate values: -
first
: take the first occurrence. -last
: take the last occurrence.
Returns: top_n : Series
-