ydata-profiling
ydata-profiling copied to clipboard
FutureWarning: `is_categorical_dtype` is deprecated
Current Behaviour
Not applicable
Expected Behaviour
Not applicable
Data Description
...\venv\Lib\site-packages\ydata_profiling\model\typeset.py:208: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
is_valid_dtype = pdt.is_categorical_dtype(series) and not pdt.is_bool_dtype(
Code that reproduces the bug
ProfileReport(
df, tsmode=True, title='ERCOT Houston LZ',
plot={
'dpi': 300,
'image_format': 'png',
},
correlations={
"auto": {"calculate": False},
"pearson": {"calculate": True},
"spearman": {"calculate": False},
"kendall": {"calculate": False},
"phi_k": {"calculate": False},
"cramers": {"calculate": False},
},
interactions={
'continuous': False,
}
)
profile.to_file(output_file='...')
pandas-profiling version
v4.6.1
Dependencies
joblib==1.3.2
numpy==1.26.1
pandas==2.1.3
python-dateutil==2.8.2
pytz==2023.3.post1
scikit-learn==1.3.2
scipy==1.11.3
six==1.16.0
threadpoolctl==3.2.0
tzdata==2023.3
OS
Windows 11
Checklist
- [X] There is not yet another bug report for this issue in the issue tracker
- [X] The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
- [X] The issue has not been resolved by the entries listed under Common Issues.
Hi @cloudy-sfu ,
can you please share what is the python version that you are using?
I'm getting the same issue on an Intel MacBook Pro, MacOS 14.1.2
and Python 3.9.2
In 2 different profiles, I also get
To hide this warning, disable the calculation
(using `df.profile_report(correlations={"auto": {"calculate": False}})`
If this is problematic for your use case, please report this as an issue:
https://github.com/ydataai/ydata-profiling/issues
(include the error message: 'Function <code object pandas_auto_compute at 0x7fb6d20000e0, file "/Users/path/to/python3.9/site-packages/ydata_profiling/model/pandas/correlations_pandas.py", line 164>')
warnings.warn(
If this is problematic for your use case, please report this as an issue:
https://github.com/ydataai/ydata-profiling/issues
(include the error message: 'could not convert string to float: 'success'')
Hi @cloudy-sfu ,
can you please share what is the python version that you are using?
Python 3.12 @fabclmnt
From pandas 2.1.0
Deprecated is_categorical_dtype(), use isinstance(obj.dtype, pd.CategoricalDtype) instead ([GH 52527](https://github.com/pandas-dev/pandas/issues/52527))