Skip to content

ENH: regex replace capacities are missing from pd.Categorical.replace() #38447

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
oguzhanogreden opened this issue Dec 13, 2020 · 0 comments
Open
Labels
Categorical Categorical Data Type Enhancement replace replace method

Comments

@oguzhanogreden
Copy link
Contributor

Is your feature request related to a problem?

pd.Categorical doesn't implement regex=, preventing a generalisable solution at #32542.

Describe the solution you'd like

As far as I can tell, the best solution would be an refactor of .replace() methods and logic.

API breaking implications

Describe alternatives you've considered

Parts of the logic from array_algos.replace.replace_regex() can be copied over to pd.Categorical, but that's not desirable. Therefore the suggestion for the refactor.

Additional context

This came up while working with the suggestion here.

@oguzhanogreden oguzhanogreden added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 13, 2020
@mroeschke mroeschke added Categorical Categorical Data Type and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 14, 2021
@jbrockmendel jbrockmendel added the replace replace method label Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Enhancement replace replace method
Projects
None yet
Development

No branches or pull requests

3 participants