Skip to content

innovate.cumulative_sum

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def cumulative_sum(data: pl.Series) -> pl.Series: ...

Compute cumulative totals in the supplied sample order using Polars.

  • data: Polars Series with a dtype supported by Series.cum_sum. The caller supplies observation order; no sorting or time inference occurs.

Series of cumulative sums with Polars’ dtype-promotion, null and non-finite-value semantics. This helper does not validate finite data.

  • polars.exceptions.PolarsError: If the series dtype does not support summation.
  • AttributeError: If the supplied object does not expose cum_sum.