Python Pandas Timestamp Subtraction vs. Numpy -
i having odd issue when subtracting timestamps in pandas (version 15.2) on python 3.4
incorrect
y = pd.timestamp('2015-04-14 00:00:00') z = pd.timestamp('2015-04-14 00:01:01') np.timedelta64(z-y) >>>numpy.timedelta64(1000000,'us')
correct
w = np.datetime64(y) x = np.datetime64(z) np.timedelta64(x-w) >>>numpy.timedelta64(61000000,'us')
correct
y = np.datetime64('2015-04-14 00:00:00') z = np.datetime64('2015-04-14 00:01:01') np.timedelta64(z-y) >>>numpy.timedelta64(61,'s')
does have explanation?
seems issue pandas 0.15.2. upgrading 0.16.0 solves issue.
Comments
Post a Comment