polars.Series.cummax#

Series.cummax(*, reverse: bool = False) Series[source]#

Get an array with the cumulative max computed at every element.

Parameters:
reverse

reverse the operation.

Examples

>>> s = pl.Series("s", [3, 5, 1])
>>> s.cummax()
shape: (3,)
Series: 's' [i64]
[
    3
    5
    5
]