polars.cum_sum
-
Вычисляет кумулятивную сумму всех значений.
Синтаксический сахар для
col(names).cum_sum().- Параметры:
-
- *names
-
Имя или имена столбцов, используемых при агрегации.
См. также
-
cumsum_horizontal
Примеры
>>> 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