time_stream.aggregation.Nth#
- class time_stream.aggregation.Nth(n)[source]#
An aggregation class to select the value at the nth time step within each aggregation period.
- Parameters:
n (int)
- __init__(n)[source]#
Initialise Nth aggregation.
- Parameters:
n (
int) – The position (starting at 1) of the time step to select within each aggregation period (e.g. n=12 selects the 12th hour of each day when aggregating hourly data to daily). With a time window, the position counts time steps within the window. The value is null if that time step is missing from the data.
Methods
__init__(n)Initialise Nth aggregation.
available()Return a sorted list of available registered keys.
expr(ctx, columns)Return the Polars expression for selecting the nth value in an aggregation period.
get(spec, **kwargs)Resolve spec to an instance of Self:
post_expr(_ctx, _columns)Return additional Polars expressions to be applied after the aggregation.
register(register_cls)A method used as a decorator for subclasses to add to the register by its name attribute.
Attributes
name