Series.nsmallest()

pandas.Series.nsmallest

Series.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 : Series

The n smallest values in the Series, in sorted o