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 · Fixed by #21711
Closed

ENH: Add set_closed method to IntervalIndex #21670

jschendel opened this issue Jun 29, 2018 · 0 comments · Fixed by #21711
Labels
Milestone

Comments

@jschendel
Copy link
Member

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]')
@jschendel jschendel added this to the Next Major Release milestone Jun 29, 2018
@jschendel jschendel modified the milestones: Next Major Release, 0.24.0 Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant