Skip to content

Please support indexing with 0 dim np.array in df.iloc. #24919

Closed
@tamuhey

Description

@tamuhey

Code Sample, a copy-pastable example if possible

The code below works correctly.

df=pd.DataFrame([[1,2],[3,4]])
df.iloc[np.array([0])]

But the code below raises an error.

df.iloc[np.array(0)]
TypeError: object of type 'numpy.int64' has no len()

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