Skip to content

Commit b80f8ef

Browse files
authored
DOC: Fix Series nlargest and nsmallest doc strings (#43964)
1 parent fc57bfb commit b80f8ef

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6597,7 +6597,7 @@ def nlargest(self, n, columns, keep: str = "first") -> DataFrame:
65976597
- `first` : prioritize the first occurrence(s)
65986598
- `last` : prioritize the last occurrence(s)
65996599
- ``all`` : do not drop any duplicates, even it means
6600-
selecting more than `n` items.
6600+
selecting more than `n` items.
66016601
66026602
Returns
66036603
-------

pandas/core/series.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -3692,11 +3692,11 @@ def nlargest(self, n=5, keep="first") -> Series:
36923692
Series of `n` elements:
36933693
36943694
- ``first`` : return the first `n` occurrences in order
3695-
of appearance.
3695+
of appearance.
36963696
- ``last`` : return the last `n` occurrences in reverse
3697-
order of appearance.
3697+
order of appearance.
36983698
- ``all`` : keep all occurrences. This can result in a Series of
3699-
size larger than `n`.
3699+
size larger than `n`.
37003700
37013701
Returns
37023702
-------
@@ -3790,11 +3790,11 @@ def nsmallest(self, n: int = 5, keep: str = "first") -> Series:
37903790
Series of `n` elements:
37913791
37923792
- ``first`` : return the first `n` occurrences in order
3793-
of appearance.
3793+
of appearance.
37943794
- ``last`` : return the last `n` occurrences in reverse
3795-
order of appearance.
3795+
order of appearance.
37963796
- ``all`` : keep all occurrences. This can result in a Series of
3797-
size larger than `n`.
3797+
size larger than `n`.
37983798
37993799
Returns
38003800
-------

pandas/core/shared_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@
492492
------
493493
AssertionError
494494
* If `regex` is not a ``bool`` and `to_replace` is not
495-
``None``.
495+
``None``.
496496
497497
TypeError
498498
* If `to_replace` is not a scalar, array-like, ``dict``, or ``None``

0 commit comments

Comments
 (0)