agg_all_by
agg_all_by creates a new table containing grouping columns and grouped data. The resulting grouped data is defined by the aggregation specified.
Note
Because agg_all_by applies the aggregation to all the columns of the table, it will ignore any column names specified for the aggregation.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| agg | Aggregation | The aggregation to apply to all columns of the source table. |
| by optional | Sequence[str] | The grouping column names. Set to |
Returns
A new table containing grouping columns and grouped data.
Examples
In this example, agg_all_by returns the median of "Number" values, grouped by X.