-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
Numeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsTimezonesTimezone data dtypeTimezone data dtype
Milestone
Description
Timestamp comparisons raise TypeError in some cases where datetimes do not:
ts = pd.Timestamp.now() ts2 = ts.tz_localize("UTC") dt = ts.to_pydatetime() dt2 = ts2.to_pydatetime() >>> ts == ts2 # <-- TypeError >>> dt == dt2 False The datetime comparison will raise for inequalities, just not == or !=.
Changing this behavior would be an API change, but it would likely simplify a bunch of headaches (including a bug in array_equivalent)
mroeschke
Metadata
Metadata
Assignees
Labels
Numeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsTimezonesTimezone data dtypeTimezone data dtype