Skip to content

updated how custom filters are implemented for the Table Report#1976

Merged
lisaleemcb merged 6 commits intoskrub-data:mainfrom
lisaleemcb:issue1969
Mar 24, 2026
Merged

updated how custom filters are implemented for the Table Report#1976
lisaleemcb merged 6 commits intoskrub-data:mainfrom
lisaleemcb:issue1969

Conversation

@lisaleemcb
Copy link
Copy Markdown
Contributor

@lisaleemcb lisaleemcb commented Mar 18, 2026

Description

Previously, the custom_filters kwarg passed to the TableReport required a nested dict such as

CUSTOM_FILTERS = {'FILTER ID': {filter1: [0,1,2]}}.

Additionally, the only custom filter type that could be passed was a list of ints, indicating the indices of the desired columns.

My proposed change is to

a) streamline the user input such that only one dictionary is required, for example,
CUSTOM_FILTERS = {filter1: selector}

and

b) changed the required input to be a skrub Selector object.

Addresses #1969

TBC

  • I have added tests that verify the bug fix
  • I have added an entry to CHANGES.rst describing the fix
  • My code follows the code style of this project
  • I have checked my code and corrected any misspellings

How Has This Been Tested?

Comment thread skrub/_reporting/_table_report.py Outdated
Comment thread skrub/_reporting/_html.py Outdated
@lisaleemcb lisaleemcb marked this pull request as ready for review March 24, 2026 14:00
Copy link
Copy Markdown
Member

@rcap107 rcap107 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks a lot @lisaleemcb

@lisaleemcb lisaleemcb merged commit 2de9508 into skrub-data:main Mar 24, 2026
29 checks passed
@lisaleemcb lisaleemcb deleted the issue1969 branch March 24, 2026 15:45
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.

3 participants