@Substitution(name='<STR_LIT>')<EOL><INDENT>@Substitution(see_also=_common_see_also)<EOL>def mean(self, *args, **kwargs):<DEDENT>
nv.validate_groupby_func('<STR_LIT>', args, kwargs, ['<STR_LIT>'])<EOL>try:<EOL><INDENT>return self._cython_agg_general('<STR_LIT>', **kwargs)<EOL><DEDENT>except GroupByError:<EOL><INDENT>raise<EOL><DEDENT>except Exception:  <EOL><INDENT>with _group_selection_context(self):<EOL><INDENT>f = lambda x: x.mean(axis=self.axis, **kwargs)<EOL>return self._python_agg_general(f)<EOL><DEDENT><DEDENT>
Compute mean of groups, excluding missing values.

Returns
-------
pandas.Series or pandas.DataFrame
%(see_also)s
Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 2, 1, 2],
...                    'B': [np.nan, 2, 3, 4, 5],
...                    'C': [1, 2, 1, 1, 2]}, columns=['A', 'B', 'C'])

Groupby one column and return the mean of the remaining columns in
each group.

>>> df.groupby('A').mean()
>>>
     B         C
A
1  3.0  1.333333
2  4.0  1.500000

Groupby two columns and return the mean of the remaining column.

>>> df.groupby(['A', 'B']).mean()
>>>
       C
A B
1 2.0  2
  4.0  1
2 3.0  1
  5.0  2

Groupby one column and return the mean of only particular column in
the group.

>>> df.groupby('A')['B'].mean()
>>>
A
1    3.0
2    4.0
Name: B, dtype: float64