Group data by specified columns and apply aggregation functions to each group.
Examples
category
column and a date component (month level) on the date
column, and then aggregates the count of sales
and the sum of revenue
:ds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
Outputs
step(..., {"param": "value", ...}) -> (output)
.
Parameters
by
parameter can be either:["column1", "column2"]
), which defaults to EXACT
grouping.by
, groupingType
, optional name
and optional param
properties.Array items
Array items
SUM
, COUNT
) as well as element-wise aggregations.
Notes:PERCENT_OF_ROWS_WHERE
: Computes the percentage within each group where a condition is true.PERCENT_OF_ROWS
: Computes the percentage relative to the total number of rows across all groups.COUNT
MIN
MAX
SUM
AVG
VARIANCE
STDEV
FIRST
LAST
P25
P50
P75
COUNT_WHERE
NUMBER_OF_ROWS
NUMBER_OF_ROWS_WHERE
PERCENT_OF_ROWS
PERCENT_OF_ROWS_WHERE
METRIC
MODE
UNIQUE_VALUES
LIST_UNIQUE
LIST
CONCATENATE
ELEMENT_COUNT
ELEMENT_MIN
ELEMENT_MAX
ELEMENT_SUM
ELEMENT_AVG
ELEMENT_VARIANCE
ELEMENT_STDEV
ELEMENT_FIRST
ELEMENT_LAST