cum_min

cum_min calculates a cumulative minimum in an update_by table operation.

Syntax

Parameters

ParameterTypeDescription
colslist[str]

The column(s) to be operated on. These can include expressions to rename the output columns (e.g., NewCol = Col). If None, the cumulative minimum is calculated for all applicable columns in the table.

Returns

An UpdateByOperation to be used in an update_by table operation.

Examples

The following example performs an update_by on the source table using the cum_min operation. No grouping columns are given, so the cumulative minimum is calculated across all rows of the table.

The following example builds on the previous by specifying Letter as the grouping column. Thus, the cumulative minimum is calculated for each unique letter.

The following example builds on the previous by calculating the cumulative minimum of two different columns using the same UpdateByOperation.

The following example builds on the previous by grouping on two columns instead of one. Each group is defined by a unique combination of letter and boolean in the Letter and Truth columns, respectively.