Skip to content

BUG: to_dense is broken #14647

Closed
Closed
@gfyoung

Description

@gfyoung

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions