Skip to content

Conversation

@felixlawrence
Copy link

Just leaving a drive-by PR, in the hope that it assists the bug report #62775. I probably won't have time to push this through 'properly'; I offer this with the hope that it helps communicate the problem and a potential solution.

A simple test case is that

pd.DataFrame.from_dict({'good': pd.Series(dict(a=1, b=2)), 'blank': pd.Series()}, orient='index').shape == (2, 2)

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good - can you add a test.

Looks like this breaks features like when there is a MultiIndex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: DataFrame.from_dict() drops empty rows with orient='index', inconsistently with empty columns

2 participants