You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to select the nth not-null method, 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.
878
+
If you want to select the nth not-null method, 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.
871
879
872
880
.. ipython:: python
873
881
@@ -877,9 +885,15 @@ If you want to select the nth not-null method, use the dropna kwarg. For a DataF
877
885
878
886
g.B.nth(0, dropna=True)
879
887
880
-
.. warning::
888
+
As with other methods, passing ``as_index=False``, will achieve a filtration, which returns the grouped row.
889
+
890
+
.. ipython:: python
881
891
882
-
Before 0.14.0 this method existed but did not work correctly on DataFrames. The API has changed so that it filters by default, but the old behaviour (for Series) can be achieved by passing dropna. An alternative is to dropna before doing the groupby.
0 commit comments