pandas: BUG: default for pd.Interval of closed/inclusive changed on main from right to both
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
print(pd.__version__)
i = pd.Interval(pd.Timestamp("2020-01-01"), pd.Timestamp("2020-01-02"))
print(repr(i))
print(i)
1.4.2
Interval('2020-01-01', '2020-01-02', closed='right')
(2020-01-01, 2020-01-02]
1.5.0.dev0+958.gf7be58a477
Interval('2020-01-01', '2020-01-02', inclusive='both')
[2020-01-01, 2020-01-02]
Issue Description
This isn’t mentioned in the release notes. We should decide on how to proceed.
Expected Behavior
Installed Versions
Replace this line with the output of pd.show_versions()
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (19 by maintainers)
Should we maybe reconsider the actual deprecation of
closedto start with (instead of fixing some issues caused by the deprecation)?I understand the strive for consistency in keyword arguments (and that certainly makes sense for things like
highlight_between,betweenandbetween_timethat those are consistent with each other), but specifically for the Interval-related methods, we already were consistently using the “closed” terminology. In addition:set_closedshould then also be deprecated/renamed?)highlight_between,betweenandbetween_time) are not related to the Interval data type, so I think consistency between those methods and interval-related methods is less important as consistency within both groups.