-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
DatetimeDatetime data dtypeDatetime data dtypeTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite
Milestone
Description
Opening an issue mostly so the upcoming PR can reference it. This is in fact already fixed in master (at least as of 9303315), so the PR is just a test.
Setup:
dti = pd.date_range('1999-09-30', periods=10, tz='US/Pacific')
ser = pd.Series(dti)
0.22.0:
>>> ser - dti
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 720, in wrapper
converted = _Op.get_op(left, right, name, na_op)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 349, in get_op
return _TimeOp(left, right, name, na_op)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 385, in __init__
self._validate(lvalues, rvalues, name)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 444, in _validate
raise ValueError("Incompatible tz's on datetime subtraction "
ValueError: Incompatible tz's on datetime subtraction ops
>>> dti - ser
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 720, in wrapper
converted = _Op.get_op(left, right, name, na_op)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 349, in get_op
return _TimeOp(left, right, name, na_op)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 385, in __init__
self._validate(lvalues, rvalues, name)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 444, in _validate
raise ValueError("Incompatible tz's on datetime subtraction "
ValueError: Incompatible tz's on datetime subtraction ops
Metadata
Metadata
Assignees
Labels
DatetimeDatetime data dtypeDatetime data dtypeTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite