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

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

Comments

Projects
None yet
2 participants
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: ContinuumIO/blaze#466

jreback added this to the 0.15.0 milestone Aug 13, 2014

Contributor

jreback commented Aug 13, 2014

sure

cpcloud self-assigned this Aug 13, 2014

@jreback jreback modified the milestone: 0.15.1, 0.15.0 Sep 9, 2014

@jreback jreback modified the milestone: 0.16.0, Next Major Release Mar 6, 2015

@jreback jreback modified the milestone: 0.18.0, Next Major Release Feb 26, 2016

jreback closed this in c81d03b Feb 27, 2016

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