cmudig / AutoProfiler

Automatically profile dataframes in the Jupyter sidebar
BSD 3-Clause "New" or "Revised" License
339 stars 11 forks source link

Support types from pandas classes #79

Closed willeppy closed 1 year ago

willeppy commented 1 year ago

Right now we recognize all types from numpy or raw python, but if the type is something like Int64Dtype then it is not recognized.

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Int64Dtype.html

willeppy commented 1 year ago

Current pandas types are in https://github.com/cmudig/AutoProfiler/blob/main/src/components/data-types/pandas-data-types.ts

willeppy commented 1 year ago

The easy way would be to add new strings to these arrays, if there is a way to use pandas for the type checking that might be better

willeppy commented 1 year ago

Make sure works when dype set in way like df_housing.price = df_housing.price.astype(pd.Int64Dtype())

willeppy commented 1 year ago

Unable to reproduce this, we seemingly have coverage for all the types in the pandas docs so closing for now