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
Return type: float
See also
Stairs.mean()
,Stairs.mode()
,Stairs.percentile()
,Stairs.percentile_Stairs()
Examples
>>> s1.plot() >>> s1.median() 0.5 >>> s1.median(2,5) 0.0