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

DEPR: Make dtype="category" always imply ordered=False #61074

Open
mroeschke opened this issue Mar 7, 2025 · 0 comments
Open

DEPR: Make dtype="category" always imply ordered=False #61074

mroeschke opened this issue Mar 7, 2025 · 0 comments
Labels
Categorical Categorical Data Type Deprecate Functionality to remove in pandas

Comments

@mroeschke
Copy link
Member

Currently one can specify dtype="category" to specify data as CategoricalDtype, and since it does not convey ordered information, we treat it as ordered=None internally in order to no-op data that is already categorical. Therefore internally, there are scenarios where we need to be mindful if we have ordered=None vs ordered=True/False

To simplify this gymnastics, it would be great if dtype="category" always meant CategoricalDtype(ordered=False). I think we would only need to issue a deprecation warning when specifying dtype="category" when the data is categorical and ordered=True

@mroeschke mroeschke added Categorical Categorical Data Type Deprecate Functionality to remove in pandas labels Mar 7, 2025
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

1 participant