Skip to content

Commit 3566c56

Browse files
AaronCritchleyTomAugspurger
authored andcommitted
DOC: Remove keep=False docs on nlargest/nsmallest (#18617)
(cherry picked from commit 73ed6de)
1 parent 04581ae commit 3566c56

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3751,7 +3751,7 @@ def nlargest(self, n, columns, keep='first'):
37513751
Number of items to retrieve
37523752
columns : list or str
37533753
Column name or names to order by
3754-
keep : {'first', 'last', False}, default 'first'
3754+
keep : {'first', 'last'}, default 'first'
37553755
Where there are duplicate values:
37563756
- ``first`` : take the first occurrence.
37573757
- ``last`` : take the last occurrence.
@@ -3788,7 +3788,7 @@ def nsmallest(self, n, columns, keep='first'):
37883788
Number of items to retrieve
37893789
columns : list or str
37903790
Column name or names to order by
3791-
keep : {'first', 'last', False}, default 'first'
3791+
keep : {'first', 'last'}, default 'first'
37923792
Where there are duplicate values:
37933793
- ``first`` : take the first occurrence.
37943794
- ``last`` : take the last occurrence.

pandas/core/series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ def nlargest(self, n=5, keep='first'):
20232023
----------
20242024
n : int
20252025
Return this many descending sorted values
2026-
keep : {'first', 'last', False}, default 'first'
2026+
keep : {'first', 'last'}, default 'first'
20272027
Where there are duplicate values:
20282028
- ``first`` : take the first occurrence.
20292029
- ``last`` : take the last occurrence.
@@ -2070,7 +2070,7 @@ def nsmallest(self, n=5, keep='first'):
20702070
----------
20712071
n : int
20722072
Return this many ascending sorted values
2073-
keep : {'first', 'last', False}, default 'first'
2073+
keep : {'first', 'last'}, default 'first'
20742074
Where there are duplicate values:
20752075
- ``first`` : take the first occurrence.
20762076
- ``last`` : take the last occurrence.

0 commit comments

Comments
 (0)