Skip to content

iat, iloc don't work with no unique index #6493

Closed
@zhangruoyu

Description

@zhangruoyu
import pandas as pd

s = pd.Series(range(5), index=[1,1,2,2,3])
s.iat[2]

which returns array([2, 3], dtype=int64), I think the result should be 2.

s.iloc[2] works, but s.iloc[[2, 3]] raise error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions