@Substitution(name='groupby')
    @Appender(_doc_template)
    def var(self, ddof=1):

        if ddof == 1:
            return self._cython_agg_general('var')
        else:
            self._set_selection_from_grouper()
            f = lambda x: x.var(ddof=ddof)
            return self._python_agg_general(f)
Compute variance of groups, excluding missing values
dataset/ETHPy150Open pydata/pandas/pandas/core/groupby.py/GroupBy.var