Skip to content

Implement fnmatch for wildcard column selection#154

Merged
tomreitz merged 1 commit into
edanalytics:feature/wildcard_matching_for_columnsfrom
pjsharpe07:wildcard_matching_for_columns
Apr 18, 2025
Merged

Implement fnmatch for wildcard column selection#154
tomreitz merged 1 commit into
edanalytics:feature/wildcard_matching_for_columnsfrom
pjsharpe07:wildcard_matching_for_columns

Conversation

@pjsharpe07
Copy link
Copy Markdown

Looking to implement the changes mentioned in issue #116

Currently this is only implemented in ModifyColumnsOperation - leaving as a draft to ensure this is the correct path to take.

else:
self.apply_jinja(data, col, val)
# Use the fnmatch column functionality to find each valid value
for data_column in data.columns:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Let me know if this approach is on the right track!

The naming convention here may need tweaking. This also allows for sequential matches to also occur ie more than one modification can happen on the same column. Unclear if that is intended behavior.

@tomreitz
Copy link
Copy Markdown
Collaborator

Hi @pjsharpe07 thanks so much for this contribution! Our team took a look and we like this approach. I'm going to merge your fork into a branch and make a few changes:

  • implement the same approach for other column operations, including drop_columns, keep_columns, combine_columns, map_values, and date_format
  • update the documentation to explain this new functionality

We'll credit you when it gets merged to main. Cheers!

@tomreitz tomreitz changed the base branch from main to feature/wildcard_matching_for_columns April 18, 2025 13:19
@tomreitz tomreitz marked this pull request as ready for review April 18, 2025 13:19
@tomreitz tomreitz merged commit bd4e76e into edanalytics:feature/wildcard_matching_for_columns Apr 18, 2025
@pjsharpe07 pjsharpe07 deleted the wildcard_matching_for_columns branch April 18, 2025 14:21
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.

2 participants