-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
get_dummies(df,sparse=True) does not return sparse DataFrame #10531
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
Comments
So this a bug here So this would need to be worked thru a bit to see if everything makes sense. pull-requests are welcome. |
@jreback I will make a PR --- if all columns are included in get_dummies, then it does not start concat-ing with an empty DataFrame. |
FWIW, the returned DataFrame does seem to be compressed (the size of the returned dataframe is much smaller with the |
That makes sense --- I believe it still will have SparseBlocks. |
closed by #10535 |
Just like it says in the subject. Here's an example:
I notice the NaN encoding in the DataFrame returned by
get_dummies
whensparse=True
but the datatype is not sparse. Is this expected behavior?The text was updated successfully, but these errors were encountered: