ydata-profiling
ydata-profiling copied to clipboard
Ignore unsupported datatypes by default
Missing functionality
If a dataframe passed to pandas_profiling.ProfileReport includes a column with an unsupported datatype, an error occurs, e.g :
AttributeError: 'GeometryArray' object has no attribute 'value_counts'
Proposed feature Avoid crashing with an error in that scenario. Instead write the error as a message in the profile report.
Alternatives considered
I've coded around this using drop (example below), but in some scenarios this would be guesswork.
pandas_profiling.ProfileReport(input_gdf.drop('geometry',axis=1))
Additional context GeoPandas is a popular package for handling spatial data. It's GeoDataFrames are built on pandas dataframes, but always include a geometry column which will bump into this issue.
Hi Mike. This is exactly the kind of problem that motivated the creation type-system-software visions.
@ieaves, might be relevant for #505.
I can probably include the proposed fix in #505.
The transition to visions will be rolling out in stages @Mike-Honey but we've already got custom geometry types prepared for geopandas users to begin leveraging.
I have this issue too. Can this be re-opened?
I'm using pandas_profiling v2.9.0 (and geopandas v0.8.1)