-
- Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
Description
Two otherwise-identical DateOffsetobjects with different normalize attributes evaluate to equal. But they do not behave equivalently:
In [1]: from pandas.tseries.offsets import * In [2]: import pandas as pd In [3]: ts = pd.Timestamp.now() In [4]: off1 = DateOffset(days=1) In [5]: off2 = DateOffset(days=1, normalize=True) In [6]: off1 == off2 Out[6]: True In [7]: ts + off1 Out[7]: Timestamp('2017-09-27 21:13:54.502976') In [8]: ts + off2 Out[8]: Timestamp('2017-09-27 00:00:00') These objects should not be considered equal. If there's consensus, I'll make a PR.