Skip to content
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

BUG: suppress error raise by nonnumeric columns when plotting DataFrame ... #3287

Merged
merged 2 commits into from Apr 12, 2013
Merged

BUG: suppress error raise by nonnumeric columns when plotting DataFrame ... #3287

merged 2 commits into from Apr 12, 2013

Conversation

changhiskhan
Copy link
Contributor

...#3108

suppressing AttributeError here so you can plot the DataFrame and automatically exclude non-numeric columns. @y-p @wesm @jreback any thoughts on 1) whether it should raise instead of exclude and 2) whether catching the AttributeError here is too dangerously broad?

@jreback
Copy link
Contributor

jreback commented Apr 8, 2013

maybe add an option raise_on_error=True as the default for plotting? (we use this option syntax else, mostly internally but use can set it)

@changhiskhan
Copy link
Contributor Author

@jreback done. By default it will raise and the users should see a helpful error msg that includes a hint to set "raise_on_error=False" to suppress the exception.

@ghost
Copy link

ghost commented Apr 9, 2013

I guess the warning makes this sort of ok, but the exception is "AttributeError" not "ValueError" ,
it's a very round-about way to catch the fact that the user is trying to plot non-numerical data
and I think it might prove brittle.

+1 for catching it higher up the stack, rather the 50 fathoms down mpl with a seemingly
unrelated error.

@jreback
Copy link
Contributor

jreback commented Apr 9, 2013

why don't we do a get_numeric_data and just avoid this issue?
though I guess user will be wondering why there string data is not plotting

@wesm
Copy link
Member

wesm commented Apr 10, 2013

Merge?

wesm added a commit that referenced this pull request Apr 12, 2013
BUG: suppress error raise by nonnumeric columns when plotting DataFrame ...
@wesm wesm merged commit d8070fa into pandas-dev:master Apr 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants