Skip to content

Commit 479728f

Browse files
committed
code review
1 parent da0026c commit 479728f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pandas/core/frame.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7505,8 +7505,8 @@ def nlargest(
75057505
75067506
- ``first`` : prioritize the first occurrence(s)
75077507
- ``last`` : prioritize the last occurrence(s)
7508-
- ``all`` : keep all the ties of the smallest item even it means
7509-
selecting more than `n` items.
7508+
- ``all`` : keep all the ties of the smallest item even if it means
7509+
selecting more than ``n`` items.
75107510
75117511
Returns
75127512
-------
@@ -7568,8 +7568,8 @@ def nlargest(
75687568
Italy 59000000 1937894 IT
75697569
Brunei 434000 12128 BN
75707570
7571-
When using ``keep='all'``, the number of element kept can go beyond n
7572-
if there are duplicates value for the smallest element, all the
7571+
When using ``keep='all'``, the number of element kept can go beyond ``n``
7572+
if there are duplicate values for the smallest element, all the
75737573
ties are kept:
75747574
75757575
>>> df.nlargest(3, 'population', keep='all')
@@ -7580,7 +7580,7 @@ def nlargest(
75807580
Maldives 434000 4520 MV
75817581
Brunei 434000 12128 BN
75827582
7583-
However, ``nlargest`` does not keep n distinct largest elements:
7583+
However, ``nlargest`` does not keep ``n`` distinct largest elements:
75847584
75857585
>>> df.nlargest(5, 'population', keep='all')
75867586
population GDP alpha-2
@@ -7626,8 +7626,8 @@ def nsmallest(
76267626
76277627
- ``first`` : take the first occurrence.
76287628
- ``last`` : take the last occurrence.
7629-
- ``all`` : keep all the ties of the largest item even it means
7630-
selecting more than `n` items.
7629+
- ``all`` : keep all the ties of the largest item even if it means
7630+
selecting more than ``n`` items.
76317631
76327632
Returns
76337633
-------
@@ -7681,9 +7681,9 @@ def nsmallest(
76817681
Tuvalu 11300 38 TV
76827682
Nauru 337000 182 NR
76837683
7684-
When using ``keep='all'``, the number of element kept can go beyond n
7685-
if there are duplicates value for the largest element, all the
7686-
ties are kept. However, ``nsmallest`` does not keep n distinct
7684+
When using ``keep='all'``, the number of element kept can go beyond ``n``
7685+
if there are duplicate values for the largest element, all the
7686+
ties are kept. However, ``nsmallest`` does not keep ``n`` distinct
76877687
smallest elements:
76887688
76897689
>>> df.nsmallest(3, 'population', keep='all')

0 commit comments

Comments
 (0)