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

ParameterTypeDescription
aggAggregation

The aggregation to apply to all columns of the source table.

by optionalSequence[str]

The grouping column names. Set to None by default.

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.