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

[WIP] Efficient Exact Duplicate Removal Code #404

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

praateekmahajan
Copy link
Collaborator

Description

Usage

# Add snippet demonstrating usage

Checklist

  • I am familiar with the Contributing Guide.
  • New or Existing tests cover these changes.
  • The documentation is up to date with these changes.

Signed-off-by: Praateek <[email protected]>
ignore_index=True,
npartitions=max(1, (df.npartitions // 3)),
)
.map_partitions(lambda x: x[~x["_hashes"].duplicated(keep="first")])
Copy link
Collaborator Author

@praateekmahajan praateekmahajan Dec 2, 2024

Choose a reason for hiding this comment

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

This is the only change, where instead of identifying all duplicates and then finding the first duplicate among set of duplicates, we're just directly removing all except the first duplicates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant