Skip to content

Conversation

@philip-khor
Copy link
Contributor

Getting FutureWarning that is_categorical is deprecated. See pandas-dev/pandas#33385

Proposed Changes

  • Change is_categorical() to is_categorical_dtype()

@philip-khor philip-khor reopened this Aug 24, 2020
@PGijsbers
Copy link
Contributor

PGijsbers commented Sep 1, 2020

I don't mean to intrude, but I encountered this issue myself and would love to see this updated in the package :)

One word of caution though, simply replacing the call does break for users with pandas 1.0.x or below.
In case it is desired to keep support for pandas<1.1.0, call the appropriate method depending on the pandas version.
The cleanest way is probably to just check if the is_categorical_dtype function is present and fall back on is_categorical if not.

@MatteoFelici
Copy link

Hi! Is there an update on this?

@RoyalTS
Copy link

RoyalTS commented Jun 24, 2021

Is there any chance of this getting merged and of the package getting updated anytime soon? Would be happy to do the work if more work needs doing.

@timvink
Copy link

timvink commented Sep 2, 2021

+1 , great package would love to see the FutureWarnings disappear :)

@jonathanng
Copy link


ignores = [
    ('category_encoders', FutureWarning, 'is_categorical is deprecated and will be removed in a future version.  Use is_categorical_dtype instead')
    # add addition warnings you want to ignore
]

for module, category, message in ignores:
    warnings.filterwarnings('ignore', module=module, category=category, message=message)

@wdm0006
Copy link
Collaborator

wdm0006 commented Oct 6, 2021

Hey all, working through some old PRs, this looks good. If you'd be interested in working to maintain the project more actively please check out #248, I'm (as you probably noticed) not able to consistently.

@wdm0006 wdm0006 merged commit d6153f0 into scikit-learn-contrib:master Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants