-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
ENH: plot only numeric data and raise an exception *before* plotting if there is no numeric data #3572
ENH: plot only numeric data and raise an exception *before* plotting if there is no numeric data #3572
Conversation
@cpcloud I think there is a flag |
|
oh |
raise_on_error is a way to catch an exception and show the message, it was only being called for nonnumeric data, so i essentially just replaced it with a typeerror which i thought was clearer. |
ok...so user can still set pls add release notes! |
I dont' use this enough to give you an opinion here, but looks reasonable |
nvm. i can use the currently-unused-method |
i think plotting only numeric data would be a better solution to this problem. have to check if any issues w/ |
this ready to merge? |
not just yet |
FYI this could be done by checking the series dtype but prob better off in. 0.12 |
:) that's what i did, but since it's not critical it might be better to wait |
also that doesn't cover the case of an object array of numbers which means you have to check the whole array for numbers which is linear in the length of the array which is probably not desirable if u want to plot something gigantic although maybe not the worst thing. |
actually since u already know the dtype that shouldn't be a problem except in the case of object |
ah good call didn't think of that |
should i do that and submit? that should work in 0.12 too right? there will still be |
sure |
guess that allows |
i could the |
maybe should put a warning on trying to plot an object type in general (if it succeeds that is); otherwise it will raise |
I think object type should warn or raise |
probably raise to make the user explicitly choose to cast it if they want |
also raise on error should probably be taken out since that's more of a stop gap than this, although that is an api change |
yep raise on object type is prob easiest thing to do |
fyi...after this merge the |
then go ahead and take it out and add a note in API |
does not raise anymore if there exists some valid data forgot a test
trivial doc fix note the docs revert back
@jreback this is ready 2 go after teh travis buildz |
ENH: plot only numeric data and raise an exception *before* plotting if there is no numeric data
Raise a
TypeError
alerting the user to the fact that they are trying to plot nonnumeric data, or if there are any numeric data plot those. closes #1818.