@@ -7505,8 +7505,8 @@ def nlargest(
7505
7505
7506
7506
- ``first`` : prioritize the first occurrence(s)
7507
7507
- ``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.
7510
7510
7511
7511
Returns
7512
7512
-------
@@ -7568,8 +7568,8 @@ def nlargest(
7568
7568
Italy 59000000 1937894 IT
7569
7569
Brunei 434000 12128 BN
7570
7570
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
7573
7573
ties are kept:
7574
7574
7575
7575
>>> df.nlargest(3, 'population', keep='all')
@@ -7580,7 +7580,7 @@ def nlargest(
7580
7580
Maldives 434000 4520 MV
7581
7581
Brunei 434000 12128 BN
7582
7582
7583
- However, ``nlargest`` does not keep n distinct largest elements:
7583
+ However, ``nlargest`` does not keep ``n`` distinct largest elements:
7584
7584
7585
7585
>>> df.nlargest(5, 'population', keep='all')
7586
7586
population GDP alpha-2
@@ -7626,8 +7626,8 @@ def nsmallest(
7626
7626
7627
7627
- ``first`` : take the first occurrence.
7628
7628
- ``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.
7631
7631
7632
7632
Returns
7633
7633
-------
@@ -7681,9 +7681,9 @@ def nsmallest(
7681
7681
Tuvalu 11300 38 TV
7682
7682
Nauru 337000 182 NR
7683
7683
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
7687
7687
smallest elements:
7688
7688
7689
7689
>>> df.nsmallest(3, 'population', keep='all')
0 commit comments