Skip to content

Subtracting Series of Timestamps gives wrong result #2629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asadovsky opened this issue Jan 3, 2013 · 2 comments
Closed

Subtracting Series of Timestamps gives wrong result #2629

asadovsky opened this issue Jan 3, 2013 · 2 comments
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@asadovsky
Copy link

Example:

In [11]: d0 = pd.to_datetime(pd.Series(["12/1/2011"]))

In [12]: d1 = pd.to_datetime(pd.Series(["12/3/2011"]))

In [13]: d1[0] - d0[0]
Out[13]: datetime.timedelta(2)

In [14]: (d1 - d0)[0]
Out[14]: 2000 days, 0:00:00

@wesm
Copy link
Member

wesm commented Jan 3, 2013

Is this on NumPy 1.6.x?

@asadovsky
Copy link
Author

Yep:
numpy.version.version prints '1.6.1'
pandas.version.version prints '0.10.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

3 participants