-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Plotting ExtensionArrays #26173
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
Comments
related issue hgrecco/pint-pandas#9 |
What version of pandas? #25590 coerces EAs to ndarray before plotting. If |
'0.25.0.dev0+430.gc79b7bb' - from a few days ago with that merge included.
so no it doesn't suffice. Passing quantity objects as opposed to floats to matploblib will allow the units converting part of matplotlib to work.* *with some changes to pint. Alternatively the ExtensionArray could provide a function to return something plotable, so we can provide |
@TomAugspurger have you had a chance to look at this? |
Most likely DataFrame.select_dtypes(include=[np.number]) should include
extension array types whose .dtype._is_numeric is True.
…On Wed, Jun 19, 2019 at 4:50 PM andrewgsavage ***@***.***> wrote:
@TomAugspurger <https://github.com/TomAugspurger> have you had a chance
to look at this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26173?email_source=notifications&email_token=AAKAOITNEHUOB2NUZKUJGGDP3KS3BA5CNFSM4HHLHBX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYDMJEI#issuecomment-503760017>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOISS3LSIAS6YU2U2HL3P3KS3BANCNFSM4HHLHBXQ>
.
|
fixed by #38246 |
I'd like to plot data from an ExtensionArray. This currently results in an error
TypeError: Empty 'DataFrame': no numeric data to plot
This is because the EA data is filtered out. Adding the ExtensionDtype to the filter criteria makes the plot work.
https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_core.py#L367
Could we get a property of the ExtensionDtype that flags the dtype as holding plotable numeric data?
The text was updated successfully, but these errors were encountered: