-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame.replace: TypeError: Cannot compare types 'ndarray(dtype=int64)' and 'unicode' #16784
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
pls show a copy-pastable example, IOW construct df1 here. |
It's simple
I am using pandas to couple some excels with some common column but different value.
|
This looks correct to me. You are trying to replace integers with string-likes, none of which match. Are you objecting over the error message? FYI
Though for the reverse we let this pass
|
@chris-b1 @jorisvandenbossche @TomAugspurger comments? |
For consistency, and since |
Kindly run above cells if you are using Jupyter notebook. I had same problem which shorted out by that. |
I'm having the same problem. I say a flag like the one that |
code sample in #16784 (comment) doesn't raise on master
maybe fixed by #36093? cc @jbrockmendel |
Code Sample, a copy-pastable example if possible
Problem description
got error:
TypeError: Cannot compare types 'ndarray(dtype=int64)' and 'unicode'
Actually
df1['positive']
only has value in (0, 1) , but I think it should not throw exception here.The text was updated successfully, but these errors were encountered: