You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keep : {‘first’, ‘last’, False}, default ‘first’
Where there are duplicate values: - first : take the first occurrence. - last : take the last occurrence.
In [2]: pd.Series(range(5)).nlargest(3, keep=False)
ValueError: keep must be either "first", "last"
In [3]: pd.DataFrame(range(5)).nsmallest(3, 0, keep=False)
ValueError: keep must be either "first", "last"
The text was updated successfully, but these errors were encountered:
For both DataFrame and Series docs:
The text was updated successfully, but these errors were encountered: