@derived_from(pd.DataFrame)
    def var(self, axis=None, skipna=True, ddof=1):
        axis = self._validate_axis(axis)
        if axis == 1:
            f = lambda x: x.var(axis=1, skipna=skipna, ddof=ddof)
            name = '{0}var(axis=1, ddof={1})'.format(self._token_prefix, ddof)
            return map_partitions(f, None, self, token=name)
        else:
            num = self._get_numeric_data()
            x = 1.0 * num.sum(skipna=skipna)
            x2 = 1.0 * (num ** 2).sum(skipna=skipna)
            n = num.count()

            def f(x2, x, n):
                try:
                    result = (x2 / n) - (x / n)**2
                    if ddof:
                        result = result * n / (n - ddof)
                    return result
                except ZeroDivisionError:
                    return np.nan
            name = '{0}var(ddof={1})'.format(self._token_prefix, ddof)
            return map_partitions(f, None, x2, x, n, token=name)
dataset/ETHPy150Open dask/dask/dask/dataframe/core.py/_Frame.var/original