StairsAccessor.limit(x, side='right')#

Takes a collection of Stairs instances and evaluates their limits across a set of points.

Technically the results of this function should be considered as \(\lim_{x \to z^{-}} f(x)\) or \(\lim_{x \to z^{+}} f(x)\), when side = ‘left’ or side = ‘right’ respectively. See A note on interval endpoints for an explanation.

xscalar or vector data

The points at which to sample the Stairs instances. Must belong to the step function domain.

side{‘left’, ‘right’}, default ‘right’

if points where step changes occur do not coincide with x then this parameter has no effect. Where a step changes occurs at a point given by x, this parameter determines if the step function is evaluated at the interval to the left, or the right.


A dataframe, where rows correspond to the Stairs instances in the pandas.Series. and columns correspond to the points in x. The dataframe will have the same index as the Series.


>>> import staircase as sc
>>> stairs = pd.Series([s2, s3], dtype="Stairs")
>>> [s2.closed, s3.closed]
["left", "left]
>>>[2,3,4], side="left"))
     2    3    4
0  0.5  0.0 -1.0
1  1.0  NaN  1.0
>>>[2,3,4], side="right"))
     2    3    4
0  0.0 -1.0 -1.0
1  0.0  NaN -1.0