-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
ERR: invalid error reporting when comparing vs. None #12689
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This is coming from this, while useful (should simply be using
is a bug and causes This is an inherently ambiguous operation, see docs here
|
This is raising the correct exception on master. Could use a test.
|
This seems to have unintended side-effects -- i.e. why should this seemingly innocuous code raise ValueError? (this is a from a real use-case around providing default values for a dataframe of plot text annotations): df_or_string = pd.DataFrame()
if df_or_string == 'foo':
print('bar') |
The "in" function does not work as expected in regard to a data frame. Let's say we have the following data frame :
df = pd.DataFrame(np.random.randn(6,4), columns=list('ABCD'))
We can test this data frame :
However we cannot test its presence in a list :
We would expect to get just False in this case.
(Pandas version 0.17.1)
The text was updated successfully, but these errors were encountered: