Open
Description
Is your feature request related to a problem?
I would like to be able to do arithmetic operations on intervals:
a + b
:
pd.Interval(3, 6) + pd.Interval(5, 7) == pd.Interval(3, 7)
a - b
:
pd.Interval(3, 6) - pd.Interval(5, 7) == pd.Interval(3, 5)
[a, b].union() / np.sum([a, b])
:intervals = pd.arrays.IntervalArray.from_tuples([(0, 1), (1, 3), (2, 4), (5, 7)]) intervals.sum() == pd.arrays.IntervalArray.from_tuples([(0, 4), (5, 7)])
API breaking implications
None AFAIK, since those methods are not implemented yet