-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Timestamp cannot be compared to np.int64: impact on series binary operations #8058
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
I think should raise That said I think its easy to put a try: except: around this comparison, catch the might also create a small function in core/common.py to make this more transparent (as it might be used elsewhere) |
@jreback Actually, I think e.g., even on Python 3:
|
I agree with @shoyer , I think in general it makes sense that |
@l736x well go ahead and put up a pr for that |
I'm sorry but I'm a humble reporter of bugs. |
Binary operations between two series fail if the .name attribute of the first is a Timestamp and the .name of the second is a numpy.int64.
It seems a corner case, but it's pretty common when the series are slices of dataframes.
It happens independently if, say, + or .add() is used.
It doesn't happen if the order is reversed.
I guess it boils down to Timestamps not having a sufficiently wide equal method.
The text was updated successfully, but these errors were encountered: