Skip to content

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

Closed
@jbrockmendel

Description

@jbrockmendel
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandas

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions