-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
EnhancementIntervalInterval data typeInterval data typeNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
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
subhrm and PaleNeutron
Metadata
Metadata
Assignees
Labels
EnhancementIntervalInterval data typeInterval data typeNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations