ydata-profiling icon indicating copy to clipboard operation
ydata-profiling copied to clipboard

Ignore unsupported datatypes by default

Open Mike-Honey opened this issue 5 years ago • 3 comments

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.

Mike-Honey avatar Jul 05 '20 13:07 Mike-Honey

Hi Mike. This is exactly the kind of problem that motivated the creation type-system-software visions.

@ieaves, might be relevant for #505.

sbrugman avatar Jul 05 '20 16:07 sbrugman

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.

ieaves avatar Jul 06 '20 14:07 ieaves

I have this issue too. Can this be re-opened?

I'm using pandas_profiling v2.9.0 (and geopandas v0.8.1)

jamesmyatt avatar Dec 15 '20 10:12 jamesmyatt