You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Improve documentation on FeatureUnion behavior with polars DataFrame output causing duplicate column names" #32121
The current documentation for FeatureUnion describes its behavior with pandas DataFrames but does not mention how it behaves when used with polars DataFrames. Specifically, FeatureUnion concatenates outputs of its transformers before the set_output wrapper renames columns based on get_feature_names_out. This works fine with pandas but causes issues with polars since polars does not allow creating a DataFrame with duplicate column names. This leads to errors when using FeatureUnion with polars outputs.
Suggest a potential alternative/fix
The documentation should mention the behavior difference when using FeatureUnion with polars DataFrames, specifically that concatenation occurs before column renaming. This can cause duplicate column names errors in polars.
It would be helpful to add a warning or note about this limitation, and suggest possible workarounds, such as manually renaming columns or converting to pandas DataFrame before using FeatureUnion.
Including a minimal example demonstrating the issue and how to avoid it would further improve clarity for users.
I've read through the description, and my understanding is that I need to add a warning note to the FeatureUnion documentation regarding its behavior with Polars DataFrames causing duplicate column names.
My plan is to locate the docstring for FeatureUnion and add the warning, along with a minimal code example to demonstrate the issue and a potential workaround, as suggested.
Activity
Swathi-Shettigar-26 commentedon Sep 7, 2025
Ravichandranayakar commentedon Sep 7, 2025
"Hi, I would like to work on this issue.
I've read through the description, and my understanding is that I need to add a warning note to the FeatureUnion documentation regarding its behavior with Polars DataFrames causing duplicate column names.
My plan is to locate the docstring for FeatureUnion and add the warning, along with a minimal code example to demonstrate the issue and a potential workaround, as suggested.
Could you please assign this to me?" 🙌❤️
AtharvaAiren commentedon Sep 7, 2025
/take
Ravichandranayakar commentedon Sep 7, 2025
Thanks after completing I will update
rashmitha-j commentedon Sep 7, 2025
adrinjalali commentedon Sep 8, 2025
The
verbose_feature_names_outalready has the necessary information .