-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
FIX Adds more informative error message for OHE #26931
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 Adds more informative error message for OHE #26931
Conversation
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.
CI failing?
sklearn/preprocessing/_encoders.py
Outdated
raise ValueError( | ||
"Pandas output does not support sparse data. Set" | ||
" sparse_output=False to output pandas DataFrames or disable pandas" | ||
" output." |
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.
" output." | |
" output via `ohe.set_output(transform="default")." |
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.
LGTM. Thanks @thomasjpfan
Reference Issues/PRs
Fixes #26515
What does this implement/fix? Explain your changes.
This PR adds a more informative error message to OHE when
sparse_output=True
and there is pandas output.