Skip to content
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

API/BUG: Inconsistent errors/msgs between loc vs at #31722

Closed
jbrockmendel opened this issue Feb 5, 2020 · 0 comments · Fixed by #31724
Closed

API/BUG: Inconsistent errors/msgs between loc vs at #31722

jbrockmendel opened this issue Feb 5, 2020 · 0 comments · Fixed by #31724
Labels
Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@jbrockmendel
Copy link
Member

df = DataFrame({"A": [1, 2, 3]}, index=list("abc"))

>>> df.at[0]
ValueError: At based indexing on an non-integer index can only have non-integer indexers
>>> df.loc[0]
TypeError: cannot do label indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [0] of <class 'int'>

I would expect these to behave the same.

@MarcoGorelli MarcoGorelli added the Error Reporting Incorrect or improved errors from pandas label Feb 5, 2020
@jreback jreback added this to the 1.1 milestone Feb 6, 2020
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.

3 participants