-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Comparing Strings to Numbers: No ValueError #11565
Comments
yeh, I think this is an api inconsistency. we should make this work I think for Note that we do have code to do this comparision even in py3, see |
Oh, really? I think the error is helpful for Series. What I find problematic is that strings always return What I originally wanted to do was replace all negative values in the DataFrame with Thoughts? |
This looks to raise correctly on master. Could use a test.
|
I noticed this quirk today: When you do a DataFrame-wide comparison (excluding
==
) using a number, it doesn't raise a ValueError (which you'd expect in Python 3); instead it always returns True.However, when you compare a Series of strings to a number, you get the expected ValueError:
Is this a bug or a feature?
Python: 3.4.3
Pandas: 0.17.0
OS: Mac OSX 10.11
The text was updated successfully, but these errors were encountered: