Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FutureWarning: is_categorical_dtype is deprecated #1501

Open
3 tasks done
cloudy-sfu opened this issue Nov 13, 2023 · 5 comments
Open
3 tasks done

FutureWarning: is_categorical_dtype is deprecated #1501

cloudy-sfu opened this issue Nov 13, 2023 · 5 comments
Labels
information requested ❔ Cannot reproduce, waiting for minimum reproduction details.

Comments

@cloudy-sfu
Copy link

cloudy-sfu commented Nov 13, 2023

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

  • There is not yet another bug report for this issue in the issue tracker
  • The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
  • The issue has not been resolved by the entries listed under Common Issues.
@fabclmnt
Copy link
Contributor

fabclmnt commented Dec 4, 2023

Hi @cloudy-sfu ,

can you please share what is the python version that you are using?

@fabclmnt fabclmnt added information requested ❔ Cannot reproduce, waiting for minimum reproduction details. and removed needs-triage labels Dec 4, 2023
@kalverra
Copy link

kalverra commented Dec 9, 2023

I'm getting the same issue on an Intel MacBook Pro, MacOS 14.1.2 and Python 3.9.2

@kalverra
Copy link

kalverra commented Dec 9, 2023

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'')

@cloudy-sfu
Copy link
Author

cloudy-sfu commented Dec 30, 2023

Hi @cloudy-sfu ,

can you please share what is the python version that you are using?

Python 3.12 @fabclmnt

@sapountzis
Copy link

sapountzis commented Jan 5, 2024

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information requested ❔ Cannot reproduce, waiting for minimum reproduction details.
Projects
None yet
Development

No branches or pull requests

5 participants