Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cpcloud opened this issue Aug 13, 2014 · 1 comment
Closed

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

cpcloud opened this issue Aug 13, 2014 · 1 comment
Assignees
Labels
Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Aug 13, 2014

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

@jreback jreback added this to the 0.15.0 milestone Aug 13, 2014
@jreback
Copy link
Contributor

jreback commented Aug 13, 2014

sure

@cpcloud cpcloud self-assigned this Aug 13, 2014
@jreback jreback modified the milestones: 0.15.1, 0.15.0 Sep 9, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@jreback jreback modified the milestones: 0.18.0, Next Major Release Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants