@Substitution(name='<STR_LIT>')<EOL><INDENT>@Appender(_common_see_also)<EOL>def median(self, **kwargs):<DEDENT>
try:<EOL><INDENT>return self._cython_agg_general('<STR_LIT>', **kwargs)<EOL><DEDENT>except GroupByError:<EOL><INDENT>raise<EOL><DEDENT>except Exception:  <EOL><INDENT>def f(x):<EOL><INDENT>if isinstance(x, np.ndarray):<EOL><INDENT>x = Series(x)<EOL><DEDENT>return x.median(axis=self.axis, **kwargs)<EOL><DEDENT>with _group_selection_context(self):<EOL><INDENT>return self._python_agg_general(f)<EOL><DEDENT><DEDENT>
Compute median of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex