polars.Series.cum_count
-
Return the cumulative count of the non-null values in the column.
- Parameters:
-
- reverse
-
Reverse the operation.
Examples
>>> s = pl.Series(["x", "k", None, "d"]) >>> s.cum_count() shape: (4,) Series: '' [u32] [ 1 2 2 3 ]
Series.cum_count(
*,
reverse: bool = False,
) → Self
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.cum_count.html