-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
BugTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suiteTimedeltaTimedelta data typeTimedelta data typeWindowsWindows OSWindows OS
Description
xref #9442
Assume following code
import pandas as pd
additions = [1e9, 1e10]
for ns in additions:
added = pd.Timestamp(0) + pd.to_timedelta(str(ns), unit='ns')
print addedThis will work fine on Linux 64 bits. However, it won't work on Windows (both 32 and 64 bits).
As for now, the following solution works fine but is not as elegant as the API nothing tells me that Timestamp(0).value will be nanoseconds in the next versions of API
import pandas as pd
additions = [1e9, 1e10]
for ns in additions:
added = pd.Timestamp(pd.Timestamp(0).value + ns)
print addedI believe to know what is causing the bug, but I have no clue on how to set up the compilation environment on windows. I would suggest to change the astype(int) to astype(long) on the following line :
https://github.com/pydata/pandas/blob/v0.13.1/pandas/tslib.pyx#L659
Anybody could try that fix or giving me insight on how to setup compilation environement on windows so I could try it myself.
Metadata
Metadata
Assignees
Labels
BugTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suiteTimedeltaTimedelta data typeTimedelta data typeWindowsWindows OSWindows OS