Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add set_closed method to IntervalIndex #21670

Closed
jschendel opened this issue Jun 29, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jschendel
Copy link
Member

commented Jun 29, 2018

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]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.