Skip to content

DataFrame.describe for all-empty should be object dtype #27183

Closed
@TomAugspurger

Description

@TomAugspurger
In [2]: df = pd.DataFrame({"A": [None, None]})

In [3]: df.describe()
Out[3]:
          A
count   0.0
unique  0.0
top     NaN
freq    NaN

That way DataFrame[object].describe() is always object dtype.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions