@docsubst<EOL><INDENT>@stat_1d<EOL>def sum(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):<DEDENT>
return self._compute_agg('<STR_LIT>', expression, binby, limits, shape, selection, delay, edges, progress)<EOL>@delayed<EOL>def finish(*sums):<EOL><INDENT>return vaex.utils.unlistify(waslist, sums)<EOL><DEDENT>expression = _ensure_strings_from_expressions(expression)<EOL>binby = _ensure_strings_from_expressions(binby)<EOL>waslist, [expressions, ] = vaex.utils.listify(expression)<EOL>progressbar = vaex.utils.progressbars(progress)<EOL>limits = self.limits(binby, limits, delay=True)<EOL>sums = [self._sum_calculation(expression, binby=binby, limits=limits, shape=shape, selection=selection, progressbar=progressbar) for expression in expressions]<EOL>s = finish(*sums)<EOL>return self._delay(delay, s)<EOL>
Calculate the sum for the given expression, possible on a grid defined by binby

        Example:

        >>> df.sum("L")
        304054882.49378014
        >>> df.sum("L", binby="E", shape=4)
        array([  8.83517994e+06,   5.92217598e+07,   9.55218726e+07,
                         1.40008776e+08])

        :param expression: {expression}
        :param binby: {binby}
        :param limits: {limits}
        :param shape: {shape}
        :param selection: {selection}
        :param delay: {delay}
        :param progress: {progress}
        :return: {return_stat_scalar}