Skip to content
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

fix: improve replace on categoricals #13223

Merged
merged 4 commits into from
Dec 27, 2023
Merged

Conversation

c-peters
Copy link
Collaborator

fix #13215

Ideally, we find a way to improve the casting to one step. For strings, we now cast str -> categorical and then do the remapping. We should use the existing mapping in the first cast.

@c-peters c-peters marked this pull request as draft December 23, 2023 16:02
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Dec 23, 2023
@c-peters c-peters marked this pull request as ready for review December 24, 2023 15:26
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Great! This should make replace a lot easier to use for categoricals.

@ritchie46 ritchie46 merged commit 8d610b1 into pola-rs:main Dec 27, 2023
25 checks passed
@c-peters c-peters deleted the cat_replace branch December 28, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make replace work for local Categoricals
3 participants