polars.cum_sum
-
Cumulatively sum all values.
Syntactic sugar for
col(names).cum_sum().- Parameters:
-
- *names
-
Name(s) of the columns to use in the aggregation.
See also
-
cumsum_horizontal
Examples
>>> df = pl.DataFrame( ... { ... "a": [1, 2, 3], ... "b": [4, 5, 6], ... } ... ) >>> df.select(pl.cum_sum("a")) shape: (3, 1) ┌─────┐ │ a │ │ --- │ │ i64 │ ╞═════╡ │ 1 │ │ 3 │ │ 6 │ └─────┘
polars.cum_sum(
*names: str,
) → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.cum_sum.html