diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py index 0293fc655742e..7133a6b6d6baf 100644 --- a/pandas/core/groupby.py +++ b/pandas/core/groupby.py @@ -719,6 +719,12 @@ def irow(self, i): FutureWarning, stacklevel=2) return self.nth(i) + def count(self): + """ Compute count of group, excluding missing values """ + + # defined here for API doc + raise NotImplementedError + def mean(self): """ Compute mean of groups, excluding missing values @@ -2674,6 +2680,7 @@ def value_counts(self, normalize=False, sort=True, ascending=False, return Series(out, index=mi) def count(self): + """ Compute count of group, excluding missing values """ ids, _, ngroups = self.grouper.group_info val = self.obj.get_values() @@ -3458,6 +3465,7 @@ def _apply_to_column_groupbys(self, func): keys=self._selected_obj.columns, axis=1) def count(self): + """ Compute count of group, excluding missing values """ from functools import partial from pandas.lib import count_level_2d from pandas.core.common import _isnull_ndarraylike as isnull