-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
BugCategoricalCategorical Data TypeCategorical Data TypeExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.
Description
The docstrings for these two methods say that values_for_foo should preserve order, but for non-ordered Categoricals, the current implementation using self.codes is not order-preserving. Is this a problem cc @jorisvandenbossche ?
Categorical.values_for_rank
exists pretty much to solve this problem for rank and value_counts. We have a special case in core.algorithms using values_for_rank that we should ideally avoid.
Metadata
Metadata
Assignees
Labels
BugCategoricalCategorical Data TypeCategorical Data TypeExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.