staircase.Stairs.to_frame#

Stairs.to_frame() pandas.core.frame.DataFrame#

Returns a pandas.DataFrame with columns ‘start’, ‘end’ and ‘value’

The rows of the dataframe can be interpreted as the interval definitions which make up the step function.

Returns
pandas.DataFrame

Examples

>>> s1.plot()
../../_images/staircase-Stairs-to_frame-1.png
>>> s1.to_frame()
0  -inf    1      0
1     1    2      1
2     2    3      0
3     3    4      1
4     4    5     -1
5     5  inf      0