Skip to content

Commit 73ed6de

Browse files
AaronCritchleyjreback
authored andcommitted
DOC: Remove keep=False docs on nlargest/nsmallest (#18617)
1 parent fe34b32 commit 73ed6de

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
@@ -3769,7 +3769,7 @@ def nlargest(self, n, columns, keep='first'):
37693769
Number of items to retrieve
37703770
columns : list or str
37713771
Column name or names to order by
3772-
keep : {'first', 'last', False}, default 'first'
3772+
keep : {'first', 'last'}, default 'first'
37733773
Where there are duplicate values:
37743774
- ``first`` : take the first occurrence.
37753775
- ``last`` : take the last occurrence.
@@ -3804,7 +3804,7 @@ def nsmallest(self, n, columns, keep='first'):
38043804
Number of items to retrieve
38053805
columns : list or str
38063806
Column name or names to order by
3807-
keep : {'first', 'last', False}, default 'first'
3807+
keep : {'first', 'last'}, default 'first'
38083808
Where there are duplicate values:
38093809
- ``first`` : take the first occurrence.
38103810
- ``last`` : take the last occurrence.

pandas/core/series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ def nlargest(self, n=5, keep='first'):
20622062
----------
20632063
n : int
20642064
Return this many descending sorted values
2065-
keep : {'first', 'last', False}, default 'first'
2065+
keep : {'first', 'last'}, default 'first'
20662066
Where there are duplicate values:
20672067
- ``first`` : take the first occurrence.
20682068
- ``last`` : take the last occurrence.
@@ -2109,7 +2109,7 @@ def nsmallest(self, n=5, keep='first'):
21092109
----------
21102110
n : int
21112111
Return this many ascending sorted values
2112-
keep : {'first', 'last', False}, default 'first'
2112+
keep : {'first', 'last'}, default 'first'
21132113
Where there are duplicate values:
21142114
- ``first`` : take the first occurrence.
21152115
- ``last`` : take the last occurrence.

0 commit comments

Comments
 (0)