Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH allows to overwrite read_csv parameter in fetch_openml #26433

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 4 commits into from
Jun 7, 2023

Conversation

glemaitre
Copy link
Member

Reopening #25488

Context

As pointed out in #25878 (comment), pandas introduced a breaking change from 1.X to 2.X to consider None as a missing value by default. If we want to avoid suffering from the breaking change and also not having a different behaviour depending on the pandas version, then we can set the default na_values in read_csv to the previous 1.X values, and announce a future change.

However, to silence this FutureWarning, we need our user to provide the future default na_values and thus we need to expose read_csv_kwargs.

This PR is the part that exposes read_csv_kwargs to our user.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

I left some minor comments about the docstring, otherwise LGTM.

@glemaitre
Copy link
Member Author

I am going to open a subsequent PR to illustrate what this PR is allowing for.

@glemaitre glemaitre marked this pull request as draft May 25, 2023 17:30
@glemaitre glemaitre marked this pull request as ready for review May 25, 2023 18:46
@glemaitre
Copy link
Member Author

I open #26436 which shows how useful this feature will be for copping with the Pandas breaking change.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

@adrinjalali adrinjalali enabled auto-merge (squash) June 7, 2023 12:02
@adrinjalali adrinjalali merged commit 586f431 into scikit-learn:main Jun 7, 2023
manudarmi pushed a commit to primait/scikit-learn that referenced this pull request Jun 12, 2023
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants