Spec-Zone.ru › Polars

polars.cum_sum

polars.cum_sum(
    *names: str,
) → Expr

Вычисляет кумулятивную сумму всех значений.

Синтаксический сахар для 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   │
└─────┘

© 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API