-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame[SparseArray] coerces to dense on sum(axis=1) #28487
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
Can you verify: this is an issue with both SparseDataFrame and DataFrame[Sparse]? |
Yes, confirmed. Same result for |
I can also confirm this on Python: 3.6.6 |
I've come across this same issue. I've been using the following method to sum the columns as a workaround:
|
This looks good now for the |
We can now use |
Code Sample, a copy-pastable example if possible
Problem description
The new sparse dataframe is coerced to dense when computing the sum.
Expected Output
The output should be computed successfully as in the scipy case.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: