-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
FIX FeatureUnion for polars output with intermediate duplicated column names #32106
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
base: main
Are you sure you want to change the base?
FIX FeatureUnion for polars output with intermediate duplicated column names #32106
Conversation
Co-authored-by: Jérôme Dockès <[email protected]>
Hum, actually this fix is not enough. When So a proper fix would be to do something like in the EDIT: Actually that was a bug that I fixed in this PR, see #32106 (comment), so we can keep the simple fix |
… into fix-feature-union-polars-output
except AttributeError as e: | ||
if "does not provide get_feature_names_out" in str(e): | ||
return None | ||
else: | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note for reviewers: this was bypassing the check for duplicates in _add_prefix_for_feature_names_out
(itself called in get_feature_names_out
), explaining why the error did not happen with pandas even when verbose_feature_names_out
was set to False.
I took the opportunity to clean-up the whole logic in the |
Fixes #32104
@glemaitre or @thomasjpfan maybe ?