Skip to content

ENH Adds feature_names_in_ to ColumnTransformer#20839

Merged
ogrisel merged 5 commits into
scikit-learn:mainfrom
thomasjpfan:feature_names_in_compose
Aug 26, 2021
Merged

ENH Adds feature_names_in_ to ColumnTransformer#20839
ogrisel merged 5 commits into
scikit-learn:mainfrom
thomasjpfan:feature_names_in_compose

Conversation

@thomasjpfan

@thomasjpfan thomasjpfan commented Aug 25, 2021

Copy link
Copy Markdown
Member

Reference Issues/PRs

Follow up to #18010

What does this implement/fix? Explain your changes.

This PR adds feature_names_in_ to ColumnTransformer. ColumnTransformer deliberately does not require check for column name consistency. (see #19263)

@thomasjpfan thomasjpfan changed the title ENH Adds feature_names_in_ to compose ENH Adds feature_names_in_ to ColumnTransformer Aug 25, 2021

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@ogrisel

ogrisel commented Aug 25, 2021

Copy link
Copy Markdown
Member

Sorry for the double review, my wifi was not responsive and I thought the first review had failed :)

@lorentzenchr lorentzenchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, only nitpicks.

Comment thread sklearn/compose/tests/test_column_transformer.py Outdated
Comment thread sklearn/compose/tests/test_column_transformer.py Outdated
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
@ogrisel ogrisel merged commit 7e7cdd6 into scikit-learn:main Aug 26, 2021
@zahs123

zahs123 commented Sep 9, 2021

Copy link
Copy Markdown

hi how can i use this feature, i am using columntransfomer and unsure how to retrieve names

@thomasjpfan

Copy link
Copy Markdown
Member Author

This feature will be available with the release of 1.0. You can try it out by installing the RC:

pip install --pre scikit-learn

samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
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.

4 participants