Skip to content

BUG/PERF: Series(category).replace #50857

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

Merged
merged 6 commits into from
Jan 24, 2023

Conversation

lukemanley
Copy link
Member

@lukemanley lukemanley commented Jan 19, 2023

Redo of #49404 with fix that was reverted in #50848

@lukemanley lukemanley added Bug Performance Memory or execution speed performance Categorical Categorical Data Type labels Jan 19, 2023
not_included = removal_set - set(self.dtype.categories)
new_categories = [c for c in self.dtype.categories if c not in removal_set]

# GH 10156
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this GH ref as nan/NA categories are no longer allowed

@mroeschke mroeschke added this to the 2.0 milestone Jan 24, 2023
@mroeschke mroeschke merged commit 859e4eb into pandas-dev:main Jan 24, 2023
@mroeschke
Copy link
Member

Thanks for resubmitting @lukemanley

pooja-subramaniam pushed a commit to pooja-subramaniam/pandas that referenced this pull request Jan 25, 2023
* bug/perf: Series(category).replace

* fixes

* add test for replace with null

* add test for GH46884
@phofl
Copy link
Member

phofl commented Feb 11, 2023

@lukemanley lukemanley mentioned this pull request Feb 12, 2023
3 tasks
@lukemanley lukemanley deleted the series-replace-categorical2 branch February 23, 2023 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Categorical Categorical Data Type Performance Memory or execution speed performance
Projects
None yet
3 participants