Skip to content

BUG: to_dense is broken #14647

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
gfyoung opened this issue Nov 13, 2016 · 2 comments
Closed

BUG: to_dense is broken #14647

gfyoung opened this issue Nov 13, 2016 · 2 comments
Labels
API Design Sparse Sparse Data Type
Milestone

Comments

@gfyoung
Copy link
Member

gfyoung commented Nov 13, 2016

As of 1d6dbb, the behaviour, documentation, and signatures for to_dense are widely inconsistent:

SparseArray: documentation is incorrect (we are not converting a SparseSeries), and the fill parameter is not even respected if you trace the code. Not sure why it was ever there in the first place.

SparseSeries: What is the purpose of sparse_only? Not only is it not documented, but it also is inconsistent with SparseArray behaviour.

SparseDataFrame: Perhaps the most intuitive of them all. Documentation is correct, and it has no unnecessary parameters like the other two do.

I propose that we change the to_dense behaviour to match that of SparseDataFrame. Take no arguments and just convert to a dense object with no questions asked.

@jorisvandenbossche jorisvandenbossche added the Sparse Sparse Data Type label Nov 14, 2016
@jreback jreback added this to the Next Major Release milestone Nov 15, 2016
@jreback
Copy link
Contributor

jreback commented Nov 15, 2016

yes I agree these should all be consistent as .to_dense()

@sinhrks
Copy link
Member

sinhrks commented Nov 15, 2016

It's nice to once organize related definitions, including .values, .get_values(), internal_values() and external_values(). maybe internals.rst?

gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 18, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 18, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 20, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 20, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 22, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 22, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 23, 2016
Patches the following for to_dense:

1) Fix SparseArray.to_dense documentation
to refer to SparseArray and not SparseSeries.

2) Deprecate the fill parameter in
SparseArray.to_dense, as that parameter was
not being respected.

3) Deprecate the sparse_only parameter in
SparseSeries.to_dense, as that parameter is
inconsistent with the to_dense API we want,
which is no parameters.

Closes pandas-devgh-14647.
@jreback jreback modified the milestones: 0.20.0, Next Major Release Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Sparse Sparse Data Type
Projects
None yet
Development

No branches or pull requests

4 participants