staircase.Stairs.median

Stairs.median(lower=-inf, upper=inf)

Calculates the median of the step function.

Parameters:
  • lower (int, float or pandas.Timestamp) – lower bound of the interval on which to perform the calculation
  • upper (int, float or pandas.Timestamp) – upper bound of the interval on which to perform the calculation
Returns:

The median of the step function

Return type:

float

Examples

>>> s1.plot()
>>> s1.median()
0.5
>>> s1.median(2,5)
0.0
../_images/staircase-Stairs-median-1.png