Closed
Description
xref #21584 (comment)
This method would allow for changing the closed
value of an existing IntervalIndex
.
Example usage:
In [2]: index = pd.interval_range(0, 3, closed='both')
In [3]: index
Out[3]:
IntervalIndex([[0, 1], [1, 2], [2, 3]]
closed='both',
dtype='interval[int64]')
In [4]: index.set_closed('neither')
Out[4]:
IntervalIndex([(0, 1), (1, 2), (2, 3)]
closed='neither',
dtype='interval[int64]')