Skip to content

Make empty data construction error message less dev-y #8020

Closed
@cpcloud

Description

@cpcloud

When one tries to construct a DataFrame where the data column count and the passed in column count differ the error message is completely unintuitive unless you know something about the internal representation of the data inside of NDFrames.

I think we should at the very least make the dimensions in the error message consistent with how the frame looks rather than how it's implemented.

this code:

df = DataFrame(np.empty(0), columns=list('abc'))

raises this exception:

ValueError: Shape of passed values is (1, 0), indices imply (3, 0)

see here for another example: blaze/blaze#466

Metadata

Metadata

Assignees

Labels

Error ReportingIncorrect or improved errors from pandas

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions