Skip to content

Commit

Permalink
DOC: Fix pandas-dev#24268 by updating description for keep in Series.…
Browse files Browse the repository at this point in the history
…nlargest (pandas-dev#25358)

* DOC: Fix pandas-dev#24268 by updating description for keep
  • Loading branch information
bharatr21 authored and alimcmaster1 committed Jun 3, 2019
1 parent 83351a6 commit 6050f19
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pandas/core/series.py
Expand Up @@ -3098,8 +3098,10 @@ def nlargest(self, n=5, keep='first'):
When there are duplicate values that cannot all fit in a
Series of `n` elements:
- ``first`` : take the first occurrences based on the index order
- ``last`` : take the last occurrences based on the index order
- ``first`` : return the first `n` occurrences in order
of appearance.
- ``last`` : return the last `n` occurrences in reverse
order of appearance.
- ``all`` : keep all occurrences. This can result in a Series of
size larger than `n`.
Expand Down Expand Up @@ -3194,8 +3196,10 @@ def nsmallest(self, n=5, keep='first'):
When there are duplicate values that cannot all fit in a
Series of `n` elements:
- ``first`` : take the first occurrences based on the index order
- ``last`` : take the last occurrences based on the index order
- ``first`` : return the first `n` occurrences in order
of appearance.
- ``last`` : return the last `n` occurrences in reverse
order of appearance.
- ``all`` : keep all occurrences. This can result in a Series of
size larger than `n`.
Expand Down Expand Up @@ -3236,7 +3240,7 @@ def nsmallest(self, n=5, keep='first'):
Monserat 5200
dtype: int64
The `n` largest elements where ``n=5`` by default.
The `n` smallest elements where ``n=5`` by default.
>>> s.nsmallest()
Monserat 5200
Expand Down

0 comments on commit 6050f19

Please sign in to comment.