Skip to content

Series[Sparse].to_dense not converting to dense. #25680

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

Closed
TomAugspurger opened this issue Mar 12, 2019 · 4 comments
Closed

Series[Sparse].to_dense not converting to dense. #25680

TomAugspurger opened this issue Mar 12, 2019 · 4 comments
Labels
Sparse Sparse Data Type
Milestone

Comments

@TomAugspurger
Copy link
Contributor

In [1]: import pandas as pd

In [2]: s = pd.Series([1, 2], dtype='Sparse[int]')

In [3]: s.to_dense()
Out[3]:
0    1
1    2
dtype: Sparse[int64, 0]
@TomAugspurger TomAugspurger added the Sparse Sparse Data Type label Mar 12, 2019
@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented Mar 12, 2019

So, I think we can (deprecate) and remove to_dense from NDFrame.

Then we recommend the.sparse.to_dense method on the accessor (I'm working on a DataFrame accessor now for the SparseDataFrame deprecations).

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Mar 13, 2019

+1 for that proposal (I suppose the historical reason was for compat with the method on SparseSeries ?)

@jorisvandenbossche jorisvandenbossche added this to the 0.25.0 milestone Mar 13, 2019
@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented Mar 13, 2019 via email

@jorisvandenbossche
Copy link
Member

Closing this in favor of #26557

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

No branches or pull requests

2 participants