IntervalIndex.set_closed(self, closed)
[source]
Return an IntervalIndex identical to the current one, but closed on the specified side
New in version 0.24.0.
Parameters: |
|
---|---|
Returns: |
|
>>> index = pd.interval_range(0, 3) >>> index IntervalIndex([(0, 1], (1, 2], (2, 3]], closed='right', dtype='interval[int64]') >>> index.set_closed('both') IntervalIndex([[0, 1], [1, 2], [2, 3]], closed='both', dtype='interval[int64]')
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.IntervalIndex.set_closed.html