Skip to content

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

Open
@mroeschke

Description

@mroeschke

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

Metadata

Metadata

Assignees

Labels

CategoricalCategorical Data TypeDeprecateFunctionality to remove in pandas

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions