staircase.Stairs.clip¶
- Stairs.clip(lower=<staircase.constants.NegInf object>, upper=<staircase.constants.Inf object>)¶
Returns a copy of self which is zero-valued everywhere outside of [lower, upper]
- Parameters
- lowerint, float or pandas.Timestamp
lower bound of the interval
- upperint, float or pandas.Timestamp
upper bound of the interval
- Returns
Stairs
Returns a copy of self which is zero-valued everywhere outside of [lower, upper)
Examples
>>> s1.clip(2,4).mean() 0.5