Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: DataFrame([empty EA Series]) returns NAs with dtype object #56231

Copy link
Copy link
Open
@mroeschke

Description

@mroeschke
Issue body actions

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

In [23]: df = pd.DataFrame([pd.Series([], dtype="Int64")], columns=[1, 2, 3])

In [24]: df
Out[24]: 
      1     2     3
0  <NA>  <NA>  <NA>

In [25]: df.dtypes
Out[25]: 
1    object
2    object
3    object
dtype: object

Issue Description

Given that the correct NA value was picked up here, I imagine it could be possible to return Int64 types here instead of object

Expected Behavior

Returning Int64 types instead of object

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugConstructorsSeries/DataFrame/Index/pd.array ConstructorsSeries/DataFrame/Index/pd.array ConstructorsDataFrameDataFrame data structureDataFrame data structureNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arrays

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.