Skip to main content

prepare_aggregate_xy

Function prepare_aggregate_xy 

Source
pub fn prepare_aggregate_xy(
    lf: &LazyFrame,
    schema: &Schema,
    spec: &AggregateSpec<'_>,
    sampling: &ChartSampling,
) -> Result<GroupedSeries>
Expand description

A line or scatter of Y aggregated per X (per time bucket for temporal X) and per color group, in one lazy group-by over the view. A count needs no Y; other aggregates draw a series per Y column (or color group of the first). Cumulative: each point is the running total through its X, per series: a running sum, or compounded rates (1 + y1)(1 + y2)... - 1 (via summed ln(1 + y)); the aggregate is ignored, except a count runs as a row count.