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

fix: fix warning related to categories #1644

Open
3 tasks done
dheenadhayalan-r opened this issue Aug 24, 2024 · 2 comments
Open
3 tasks done

fix: fix warning related to categories #1644

dheenadhayalan-r opened this issue Aug 24, 2024 · 2 comments

Comments

@dheenadhayalan-r
Copy link

Current Behaviour

typeset.py:125: DeprecationWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, pd.CategoricalDtype) instead

is_valid_dtype = pdt.is_categorical_dtype(series) and not pdt.is_bool_dtype(
/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/ydata_profiling/model/pandas/summary_pandas.py:39: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set pd.set_option('future.no_silent_downcasting', True)
series = series.fillna(np.nan)

Expected Behaviour

ydata profiling , unable to categorize like"Lowe Case","Upper Case" etc.

Data Description

same issue for all types of data

Code that reproduces the bug

No response

pandas-profiling version

Version: 4.9.0

Dependencies

pandas==2.2.2

OS

Databricks Runtime

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 fabclmnt changed the title Bug Report fix: fix warning related to categories Aug 26, 2024
@fabclmnt
Copy link
Contributor

Hi @dheenadhayalan-r ,

thank you for your report. Nevertheless, it is quite hard to grasp what is the issue? If our team have understood correctly it seems like it is related with solving the latest warnings issues. Can you please confirm?

Not sure what do you mean by:
"Expected Behaviour

ydata profiling , unable to categorize like"Lowe Case","Upper Case" etc."

Can you please provide a more detailed report?

@timschott
Copy link

the issue is related to the pandas future warning.
the fix is placing
with pd.option_context("future.no_silent_downcasting", True): here
(reference - ydata_profiling/model/pandas/summary_pandas.py:39)
can you all please update this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants