Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BUG: Improved error msg #32855
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
BUG: Improved error msg #32855
Changes from 5 commits
15f32b7
3ef72e6
5ce133a
5a3a43d
e89c7d6
1d4ad9c
8ebadc7
957f77e
b326574
c032efa
b1ee783
451b6b6
f601fd3
2817147
b275f21
f924bf0
88fadf8
90ac52b
217a35a
f37ed23
de6d168
91961d6
b792fea
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing this on master, the DataFrame case is giving a reasonable message, while the Series case is unhelpful. Maybe condition this on
self.ndim == 1
and add a suggestion "pass a tuple"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It the Series case goes down a different code path where an exception is raised in
pandas/utils/_validators.py
. Would adding an except for TypeError with a more informative error message work?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a similar problem for
at.__setitem__
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiindex with
at.__setitem__
doesn't raise an exception and sets items at level 0: