Skip to content

PEFR/BUG/API: rename_categories with a series #17981

Closed
@TomAugspurger

Description

@TomAugspurger
In [2]: pd.Categorical(['a', 'b']).rename_categories(pd.Series([0, 1]))
Out[2]:
[a, b]
Categories (2, object): [a, b]

In 0.20.3 that was

[0, 1]
Categories (2, int64): [0, 1]
In [9]:

Do we want to treat series like an array or a dictionary here?

(this is causing the perf slowdown in rank I think).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions