8000 ENH Adds support for list of bools in column transformer by thomasjpfan · Pull Request #17616 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH Adds support for list of bools in column transformer #17616

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 11 commits into from
Aug 7, 2020

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #17586

What does this implement/fix? Explain your changes.

This could be considered a bug fix since we support "array-like" of bools.

@@ -297,6 +305,14 @@ def test_column_transformer_empty_columns(pandas, column):
assert len(ct.transformers_) == 2 # including remainder
assert isinstance(ct.transformers_[0][1], Trans)

# trans2 is not passed anything because column does not select any
Copy link
Member

Choose a reason for hiding this comment

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

no, it's not even fitted. I think, rather, you should be using TransRaise in some of the above ct definitions, rather than introducing a new case.

@jnothman
Copy link
Member
jnothman commented Jul 2, 2020

Are lists of bools including True handled and tested elsewhere?

@thomasjpfan
Copy link
Member Author

List of bool are handled in test_column_transformer and test_column_transformer_dataframe. I added more tests to check for list of bools that include True.

@zachmayer
Copy link
Contributor

@thomasjpfan you have merge conflicts to resolve =/

@thomasjpfan
Copy link
Member Author

Thank you for the ping!

(There must be some service or bot that could ping me when one of my PRs have a merge conflict because of an update to master)

@zachmayer
Copy link
Contributor

@thomasjpfan @jnothman this looks good to merge to me! Anything else that needs to be done?

Copy link
Member
@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

@rth rth merged commit 3a796a5 into scikit-learn:master Aug 7, 2020
@thomasjpfan thomasjpfan deleted the column_transformer_bool_list branch August 7, 2020 13:41
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
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.

Inconsisent behaivor in ColumnTransformer with "all False" vs "empty list"
4 participants
0