staircase.StairsSlicer.max#

StairsSlicer.max() float#

Calculates the max of each step function slice

Returns
pandas.Series

Examples

>>> df = sc.make_test_data(seed=0)
>>> sf = sc.Stairs(df, "start", "end", "value")
>>> sf.plot()
../../_images/staircase-StairsSlicer-max-1.png
>>> sf.slice(pd.date_range("2021", periods=12, freq="MS")).max()
[2021-01-01, 2021-02-01)    492.0
[2021-02-01, 2021-03-01)    418.0
[2021-03-01, 2021-04-01)    587.0
[2021-04-01, 2021-05-01)    564.0
[2021-05-01, 2021-06-01)    463.0
[2021-06-01, 2021-07-01)    480.0
[2021-07-01, 2021-08-01)    543.0
[2021-08-01, 2021-09-01)    502.0
[2021-09-01, 2021-10-01)    486.0
[2021-10-01, 2021-11-01)    505.0
[2021-11-01, 2021-12-01)    509.0
dtype: float64