Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Better error messages #497
I'm trying to build a dataframe from a list of list and I get an "AssertionError" and I have no idea what I did wrong or what I should do differently. A shorted version of the data and code:
df = DataFrame(_data2, columns=_fields )
It would be nice if pandas could output a more descriptive error message in case some inputs are not what pandas expects.
Thanks a lot for the lib!
ok, here's the new exception:
for this data you'd want to do:
because you have the columns in the rows,
Thanks a lot for this change!
I'm still not sure if I would have understood the error. How about something like "12 column name(s) passed, but passed data had 5 columns." or even a added"... If you passed in a list of list, maybe transposing the data with zip(*data) helps."?