-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
API DesignError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasTimedeltaTimedelta data typeTimedelta data type
Milestone
Description
See #21427
The issue is that a (non-Day) Tick object with normalize=True breaks addition monotonicity/associativity:
now = pd.Timestamp.now()
tick = pd.offsets.Minute(n=3, normalize=True)
>>> now
Timestamp('2018-06-11 17:38:10.135400')
>>> now + tick
Timestamp('2018-06-11 00:00:00')
>>> now + 64*tick + 64*tick
Timestamp('2018-06-11 00:00:00')
>>> now + 128*tick
Timestamp('2018-06-12 00:00:00')
The Day tick doesn't have the same problem, but I'd prefer to disallow it rather than make it a double-special-case. (See #20633 for more discussion about how Day should behave)
Metadata
Metadata
Assignees
Labels
API DesignError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasTimedeltaTimedelta data typeTimedelta data type