Skip to content

DataFrame gives uninformative error message when comparing to constants #943

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

Closed
hammer opened this issue Mar 20, 2012 · 1 comment
Closed
Milestone

Comments

@hammer
Copy link

hammer commented Mar 20, 2012

For any DataFrame with numeric values, saying something like df == 'cmp'results in PandasError: DataFrame constructor not properly called!, which is pretty unintuitive. I'm not sure what behavior would be correct, but I do know that this error message is not helpful.

@wesm
Copy link
Member

wesm commented Mar 20, 2012

Surprised this never came up until now:

In [9]: np.random.randn(10) == 'cmp'
Out[9]: False

Easy to check for and will raise a more helpful exception

@wesm wesm closed this as completed in 330c088 Mar 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants