Skip to content
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

ENH preserve dtype and type when providing a dataframe with sparse dtype #1054

Conversation

ts2095
Copy link
Contributor

@ts2095 ts2095 commented Nov 28, 2023

Reference Issue

Fixes #1053

What does this implement/fix? Explain your changes.

Sparse DataFrames resulting in sparse matrices are correctly reassembled as sparse DataFrames using DataFrame.sparse.from_spmatrix.

Any other comments?

@glemaitre glemaitre self-requested a review January 19, 2024 16:23
@glemaitre glemaitre changed the title [MRG] FIX _transform_one fails on sparse DataFrame ENH preserve dtype and type when providing a dataframe with sparse dtype Jan 19, 2024
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

I made a common tests for all samplers.
Otherwise LGTM. Thanks @ts2095

@glemaitre glemaitre merged commit 9e976a4 into scikit-learn-contrib:master Jan 19, 2024
17 of 21 checks passed
@glemaitre
Copy link
Member

The failures are unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] _transform_one fails on sparse DataFrame
2 participants