Skip to content

DEPR: pd.Categorical #55550

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

Open
3 tasks done
jbrockmendel opened this issue Oct 16, 2023 · 0 comments
Open
3 tasks done

DEPR: pd.Categorical #55550

jbrockmendel opened this issue Oct 16, 2023 · 0 comments
Labels
Categorical Categorical Data Type Deprecate Functionality to remove in pandas

Comments

@jbrockmendel
Copy link
Member

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

NA

Issue Description

Categorical predates general EAs, and is the only EA directly in the pandas namespace. Could we deprecate Categorical as being public and tell users to user Series[cat] or CategoricalIndex instead?

Having it be public makes it modestly harder to make improvements. e.g. #40996 would be easier to implement if it weren't user facing.

union_categoricals is public and operates on Categoricals, which would be weird if Categorical were made private. Maybe something like #51362 making pd.concat behave like union_categoricals would make union_categoricals unnecessary?

On the flip side, Categorical is special, and some of the special-casing of it internally isn't likely to go away. So maybe we just live with it?

Expected Behavior

NA

Installed Versions

Replace this line with the output of pd.show_versions()

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 16, 2023
@lithomas1 lithomas1 added Categorical Categorical Data Type Deprecate Functionality to remove in pandas and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Deprecate Functionality to remove in pandas
Projects
None yet
Development

No branches or pull requests

2 participants