Skip to content

Negative interger indices lead to IndexError: indices are out-of-bounds  #11320

Closed
@DSLituiev

Description

@DSLituiev

The following test case produces IndexError: indices are out-of-bounds with negative integers, while positive work fine:

testdf = pd.DataFrame({"rna": (1.5,2.2,3.2,4.5),  -1000: [11,21,36,40],0: [10,22,43,34], 1000:[0, 10, 20, 30]})
testdf[[1000]] #this works
testdf[[-1000]] #this does not

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