abs_sum_by
abs_sum_by creates a new table containing the absolute sum for each group.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| by optional | Union[str, Sequence[str]] | The column(s) by which to group data. Default is |
Returns
A new table containing the absolute sum for each group.
Examples
In this example, abs_sum_by returns the absolute sum of the whole table.
In this example, abs_sum_by returns the absolute sum, as grouped by X. Because a sum can not be computed for the string column Y, this column is dropped before applying abs_sum_by.