Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
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 |
|
@jreback this is ready 2 go after teh travis buildz |
jreback
added a commit
that referenced
this pull request
May 21, 2013
|
|
jreback |
03d2d30
|
cpcloud commentedMay 11, 2013
Raise a
TypeErroralerting the user to the fact that they are trying to plot nonnumeric data, or if there are any numeric data plot those. closes #1818.