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

feat(rust,python): Implement DataFrame.unique(keep="none") #6169

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Jan 10, 2023

Partially addresses #6125

Changes:

  • Add a KeepNone entry to the KeepStrategy enum
  • Implement unique for this option using select -> is_unique -> filter. This should preserve order so the maintain_order argument is ignored.
    • Not sure if this is most efficient - but the existing groupby -> agg_first logic does not seem to be easily adjusted for dropping all duplicates.
  • Update things accordingly on the Python side.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Jan 10, 2023
@stinodego stinodego changed the title feat(python): Implement DataFrame.unique(keep="none") feat(rust,python): Implement DataFrame.unique(keep="none") Jan 11, 2023
@github-actions github-actions bot added the rust Related to Rust Polars label Jan 11, 2023
@ritchie46 ritchie46 merged commit 5caa68d into pola-rs:master Jan 11, 2023
@stinodego stinodego deleted the drop-duplicates-keep-none branch February 22, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants