-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Unable to compare timedelta64 to timedelta #5963
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
Comments
This might be related: #5436 |
ok...this is legit...just need some coercion can you update to show if timedelta64 works? |
I ran into the same issue with pandas master, though i get a different exception (maybe a difference in numpy version?): import pandas as pd
import numpy as np
from datetime import timedelta
print np.__version__
s = pd.Series([timedelta(days=1), timedelta(days=2)])
s > timedelta(days=1) prints
FWIW: this was working with 0.10.1. Thanks! |
timedeltas have been steadily moving towards being kept as in any event if you want pretty much anything to work with timedeltas you need numpy >= 1.7 1.6.1 is barely supported (most tests are skipped) as it is so thoroughly broken (datetime64 in 1.6.1 at least work somewhat) so welcome to take a look with 1.6.1 but its a nightmare (serieously)... this issue is pretty straightforward in numpy >= 1.7 all of the timedelta conversions are done here: https://github.com/pydata/pandas/blob/master/pandas/core/ops.py#L243 |
The comparison does work for
timedelta64
:The text was updated successfully, but these errors were encountered: