Skip to content

Commit 26c14e9

Browse files
DOC: correct example use of nth dropna keyword
dropna=True is deprecated, see pandas-dev#17493
1 parent 4004367 commit 26c14e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/groupby.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ To select from a DataFrame or Series the nth item, use the nth method. This is a
10601060
g.nth(-1)
10611061
g.nth(1)
10621062
1063-
If you want to select the nth not-null item, use the ``dropna`` kwarg. For a DataFrame this should be either ``'any'`` or ``'all'`` just like you would pass to dropna, for a Series this just needs to be truthy.
1063+
If you want to select the nth not-null item, use the ``dropna`` kwarg. For a DataFrame this should be either ``'any'`` or ``'all'`` just like you would pass to dropna:
10641064

10651065
.. ipython:: python
10661066
@@ -1072,7 +1072,7 @@ If you want to select the nth not-null item, use the ``dropna`` kwarg. For a Dat
10721072
g.nth(-1, dropna='any') # NaNs denote group exhausted when using dropna
10731073
g.last()
10741074
1075-
g.B.nth(0, dropna=True)
1075+
g.B.nth(0, dropna='all')
10761076
10771077
As with other methods, passing ``as_index=False``, will achieve a filtration, which returns the grouped row.
10781078

0 commit comments

Comments
 (0)