8000 Add selector user guide by Vincent-Maladiere · Pull Request #1419 · skrub-data/skrub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add selector user guide #1419

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

Merged
merged 3 commits into from
Jun 16, 2025
Merged

Conversation

Vincent-Maladiere
Copy link
Member

Fixes #1382

- Delayed selection: passing a selection rule, to be evaluated later on a
dataframe that is not yet available. For example, without selectors
it is not possible to instantiate a :class:`~skrub.SelectCols` that selects "all
columns that have numerical data types, except the column ``'User ID'``", if the
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not very convinced by this example. How about using datetime columns that haven't yet been parsed as datetimes? So they'd start as strings, and the selector for dates would not recognize them as such.

Copy link
Member Author
@Vincent-Maladiere Vincent-Maladiere Jun 4, 2025

Choose a reason for hiding this comment

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

better? "all columns except those with the suffix 'ID'"

Copy link
Contributor

Choose a reason for hiding this comment

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

to me the delayed selection is important when there are transformations that add or modify columns so that they're different from the input, so casting to a different datatype or maybe generating features with one of the encoders (which is why I mentioned datetimes)

"all columns except those with the suffix ID" looks to me like something that could be done immediately

Copy link
Contributor
@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.

Thanks a lot for the PR @Vincent-Maladiere

I made a few comments, mostly to reword a few sentences.

dataframes:

>>> import pandas as pd
>>> df = pd.DataFrame(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if there should be a line explaining that "this is a dataset about page sizes", I find it a bit unusual and did not understand what the numbers were saying the first read through

@Vincent-Maladiere
Copy link
Member Author
  • We can revamp this user guide slightly with OnEachColumn
  • It might be worth adding an example for selectors as well

@rcap107
Copy link
Contributor
rcap107 commented Jun 6, 2025
  • We can revamp this user guide slightly with OnEachColumn
  • It might be worth adding an example for selectors as well

In this PR or a separate one?

@Vincent-Maladiere
Copy link
Member Author

Maybe in a separate one?

Copy link
Contributor
@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.

sure we can always iterate in separate PRs

@Vincent-Maladiere
Copy link
Member Author

waiting for @GaelVaroquaux to have a quick look before merging

@rcap107
Copy link
Contributor
rcap107 commented Jun 16, 2025

@GaelVaroquaux mentioned in the weekly meeting that this and other doc PRs should be iterated over, so we can merge it and open new PRs as needed

@rcap107 rcap107 merged commit 3869319 into skrub-data:main Jun 16, 2025
26 checks passed
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.

Add an example on the selectors
2 participants
0