-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame creation incorrect error message #20742
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
Labels
Error Reporting
Incorrect or improved errors from pandas
Milestone
Comments
the first example is wrong. The block manager reports this, but doesn't flip the dim (like we do for everything else), so would welcome a PR to correct that. I don't see a problem with the 2nd. You gave a 1, 4 array. That's the same as the dim of the frame, so it constructs. |
meiermark
added a commit
to meiermark/pandas
that referenced
this issue
Jan 11, 2019
meiermark
added a commit
to meiermark/pandas
that referenced
this issue
Jan 11, 2019
4 tasks
meiermark
added a commit
to meiermark/pandas
that referenced
this issue
Jan 11, 2019
4 tasks
TomAugspurger
pushed a commit
that referenced
this issue
Jan 18, 2019
#24725) * BUG: Switched shapes in ValueError msg in DataFrame construct (#20742) * DOC: improved docu of the value error msg changes TST: adjusted panel test for change in value error msg in block manager TST: adjusted dataframe init test from json for change in value error msg in block manager * BUG: printed a list instead of a tuple in the ValueError msg * CLN: removed unnecessary list comprehension * DOC: Improved whatsnew message * CLN: readded deleted tests CLN: removed issue number above new tests * Bug: No changes for panel * DOC: improved whatsnew message for reversed shapes * DOC: improved comments and whatsnew message for df construction error * DOC: improved whatsnew message
Pingviinituutti
pushed a commit
to Pingviinituutti/pandas
that referenced
this issue
Feb 28, 2019
…-dev#20742) (pandas-dev#24725) * BUG: Switched shapes in ValueError msg in DataFrame construct (pandas-dev#20742) * DOC: improved docu of the value error msg changes TST: adjusted panel test for change in value error msg in block manager TST: adjusted dataframe init test from json for change in value error msg in block manager * BUG: printed a list instead of a tuple in the ValueError msg * CLN: removed unnecessary list comprehension * DOC: Improved whatsnew message * CLN: readded deleted tests CLN: removed issue number above new tests * Bug: No changes for panel * DOC: improved whatsnew message for reversed shapes * DOC: improved comments and whatsnew message for df construction error * DOC: improved whatsnew message
Pingviinituutti
pushed a commit
to Pingviinituutti/pandas
that referenced
this issue
Feb 28, 2019
…-dev#20742) (pandas-dev#24725) * BUG: Switched shapes in ValueError msg in DataFrame construct (pandas-dev#20742) * DOC: improved docu of the value error msg changes TST: adjusted panel test for change in value error msg in block manager TST: adjusted dataframe init test from json for change in value error msg in block manager * BUG: printed a list instead of a tuple in the ValueError msg * CLN: removed unnecessary list comprehension * DOC: Improved whatsnew message * CLN: readded deleted tests CLN: removed issue number above new tests * Bug: No changes for panel * DOC: improved whatsnew message for reversed shapes * DOC: improved comments and whatsnew message for df construction error * DOC: improved whatsnew message
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem was already mentioned as part of other issues, but still persists in 0.22
#8020
blaze/blaze#466
Reported both expected shape and input data shape are both transposed which causes a lot of confusion. In my opinion, the reference value should be
DataFrame.shape
.Below are shapes which are expected to be reported:
I'm not sure, whether this is another issue, but in the first example, the error cause is 1-dimensional data while constructor expects 2-dimensional data. The user gets no hint about this from the error message.
The text was updated successfully, but these errors were encountered: