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
Copy file name to clipboardExpand all lines: doc/source/groupby.rst
+3-3
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
import pandas as pd
11
11
pd.options.display.max_rows =15
12
12
import matplotlib
13
-
matplotlib.style.use('ggplot')
13
+
#matplotlib.style.use('default')
14
14
import matplotlib.pyplot as plt
15
15
plt.close('all')
16
16
from collections import OrderedDict
@@ -1060,7 +1060,7 @@ To select from a DataFrame or Series the nth item, use the nth method. This is a
1060
1060
g.nth(-1)
1061
1061
g.nth(1)
1062
1062
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:
1064
1064
1065
1065
.. ipython:: python
1066
1066
@@ -1072,7 +1072,7 @@ If you want to select the nth not-null item, use the ``dropna`` kwarg. For a Dat
1072
1072
g.nth(-1, dropna='any') # NaNs denote group exhausted when using dropna
1073
1073
g.last()
1074
1074
1075
-
g.B.nth(0, dropna=True)
1075
+
g.B.nth(0, dropna='all')
1076
1076
1077
1077
As with other methods, passing ``as_index=False``, will achieve a filtration, which returns the grouped row.
0 commit comments