Skip to content
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

FIX TransformerMixin does not override index if transform=pandas #25747

Merged
merged 2 commits into from Mar 8, 2023

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #25730

What does this implement/fix? Explain your changes.

Looking back, setting the index may be too strict and may be intuitive for third party estimator developers.

Note that setting the columns is still required because estimators like ColumnTransformer has verbose_feature_names_out options that updates the column names. This way get_feature_names_out is consistent with the dataframe out of transform.

Any other comments?

I am placing this on 1.2.2, but I am okay with pushing it to the next release if we do not come with a consensus.

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

I am fine with this proposal.

@thomasjpfan thomasjpfan added this to the 1.2.2 milestone Mar 8, 2023
@thomasjpfan thomasjpfan added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Mar 8, 2023
@thomasjpfan thomasjpfan mentioned this pull request Mar 8, 2023
12 tasks
Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Let's squeeze it in 1.2.2

@jeremiedbb jeremiedbb merged commit cc8228e into scikit-learn:main Mar 8, 2023
@jeremiedbb
Copy link
Member

@thomasjpfan in exchange, could you have a new look at #25733 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:utils To backport PR merged in master that need a backport to a release branch defined based on the milestone.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FeatureUnion not working when aggregating data and pandas transform output selected
3 participants