staircase.Stairs.clip#
- Stairs.clip(lower=<staircase.constants.NegInf object>, upper=<staircase.constants.Inf object>)#
Returns a copy of self which is undefined everywhere outside of [lower, upper]
- Parameters:
- lowerint, float, pandas.Timedelta, pandas.Timestamp or str
lower bound of the interval. A string argument is assumed to be a string representation of a pandas.Timestamp
- upperint, float, pandas.Timedelta, pandas.Timestamp or str
upper bound of the interval. A string argument is assumed to be a string representation of a pandas.Timestamp
- Returns:
Stairs
Returns a copy of self which is undefined everywhere outside of [lower, upper)
Examples
>>> s1.clip(2,4).mean() 0.5