def _make_stat_function(cls, name, name1, name2, axis_descr, desc, f, see_also='', examples=''):

    @Substitution(desc=desc, name1=name1, name2=name2, axis_descr=axis_descr, min_count='', see_also=see_also, examples=examples)
    @Appender(_num_doc)
    def stat_func(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs):
        if (name == 'median'):
            nv.validate_median(tuple(), kwargs)
        else:
            nv.validate_stat_func(tuple(), kwargs, fname=name)
        if (skipna is None):
            skipna = True
        if (axis is None):
            axis = self._stat_axis_number
        if (level is not None):
            return self._agg_by_level(name, axis=axis, level=level, skipna=skipna)
        return self._reduce(f, name, axis=axis, skipna=skipna, numeric_only=numeric_only)
    return set_function_name(stat_func, name, cls)
def _make_stat_function(cls, name, name1, name2, axis_descr, desc, f, see_also=, examples=):

    @Substitution(desc=desc, name1=name1, name2=name2, axis_descr=axis_descr, min_count=, see_also=see_also, examples=examples)
    @Appender(_num_doc)
    def stat_func(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs):
        if (name == 'median'):
            nv.validate_median(tuple(), kwargs)
        else:
            nv.validate_stat_func(tuple(), kwargs, fname=name)
        if (skipna is None):
            skipna = True
        if (axis is None):
            axis = self._stat_axis_number
        if (level is not None):
            return self._agg_by_level(name, axis=axis, level=level, skipna=skipna)
        return self._reduce(f, name, axis=axis, skipna=skipna, numeric_only=numeric_only)
    return set_function_name(stat_func, name, cls)