Skip to content
Prev Previous commit
Next Next commit
Update the description of keep
Update according to suggestion by @TomAugsperger
  • Loading branch information
bharatr21 authored Feb 19, 2019
commit 28aa45b938934c25e5fbedec01439d86ab9225ea
6 changes: 6 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3107,6 +3107,9 @@ def nlargest(self, n=5, keep='first'):
- ``all`` : keep all occurrences. This can result in a Series of
size larger than `n`.

The `keep` parameter determines which ones to keep when there are duplicates.
Regardless of `keep`, the result will be sorted by the row label.

Returns
-------
Series
Expand Down Expand Up @@ -3204,6 +3207,9 @@ def nsmallest(self, n=5, keep='first'):
reverse of the given index order.
- ``all`` : keep all occurrences. This can result in a Series of
size larger than `n`.

The `keep` parameter determines which ones to keep when there are duplicates.
Regardless of `keep`, the result will be sorted by the row label.

Returns
-------
Expand Down