-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
EnhancementExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.Visualizationplottingplotting
Description
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
numeric_data = data.select_dtypes(include=[np.number,
"datetime",
"datetimetz",
"timedelta",
pint.PintType])
Could we get a property of the ExtensionDtype that flags the dtype as holding plotable numeric data?
Metadata
Metadata
Assignees
Labels
EnhancementExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.Visualizationplottingplotting