SeriesGroupBy.nsmallest()

pandas.core.groupby.SeriesGroupBy.nsmallest

SeriesGroupBy.nsmallest(*args, **kwargs)

Return the smallest n elements.

Parameters:

n : int

Return this many ascending sorted values

keep : {‘first’, ‘last’, False}, default ‘first’

Where there are duplicate values: - first : take the first occurrence. - last : take the last occurrence.

take_last : deprecated

Returns:

bottom_n登录查看完整内容