pandas.core.groupby.GroupBy.sum

GroupBy.sum(self, **kwargs)[source]

Compute sum of group values.

Returns
Series or DataFrame

Computed sum of values within each group.