We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
xref #10477
It is possible with numpy, but not with pandas:
import numpy as np import pandas as pd ts1 = pd.Timestamp('2015-07-01 10:00:00').tz_localize('Europe/London') ts2 = pd.Timestamp('2015-07-01 11:00:00').tz_localize('Europe/London') dt = ts2 - ts1 x = np.array([ts1, ts2]) print(x) dx = np.array([dt, dt]) print(x + dx) s = pd.Series([ts1, ts2]) print(s) ds = pd.Series([dt, dt]) print(s + ds)
s + ds throws an error ufunc add cannot use operands with types dtype('O') and dtype('<m8[ns]')
s + ds
ufunc add cannot use operands with types dtype('O') and dtype('<m8[ns]')