Skip to content

Conversation

@mborodii-prog
Copy link
Contributor

This pull request adds a new function for comparing lists in DataFrames and improves the flexibility of existing comparison functions. The main changes introduce a configurable way to compare multiple list columns, including options for intersection, difference, union, and overlap, as well as duplicate and case sensitivity handling. Additionally, minor code style and validation improvements were made to the text comparison function.

New list comparison functionality:

  • Added lists function to wrangles/recipe_wrangles/compare.py to compare multiple list columns in a DataFrame, supporting intersection, difference, union, and overlap methods, with options to remove duplicates and ignore case.
  • Introduced remove_duplicates utility in wrangles/compare.py to handle duplicate removal and case sensitivity for list comparisons.

@mborodii-prog mborodii-prog added this to the v1.16 milestone Nov 28, 2025
@mborodii-prog mborodii-prog linked an issue Nov 28, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces a new compare.lists function for comparing list columns in DataFrames and refactors existing code for improved consistency. The main purpose is to enable flexible list comparison operations (intersection, difference, union, overlap) with configurable options for duplicate removal and case sensitivity.

Key changes:

  • Added lists function in wrangles/recipe_wrangles/compare.py supporting four comparison methods with case sensitivity and duplicate removal options
  • Created remove_duplicates utility function in wrangles/compare.py to handle duplicate removal logic
  • Updated code style in existing text function to use consistent double quotes

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
wrangles/recipe_wrangles/compare.py Added new lists function for list comparison and updated text function code style to use double quotes
wrangles/compare.py Added remove_duplicates utility function to support list comparison operations
tests/recipes/wrangles/test_compare.py Added comprehensive test suite for new lists function and updated existing test formatting to use double quotes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mborodii-prog mborodii-prog added the enhancement New feature or request label Nov 28, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Wrangle Compare Lists

2 participants