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

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

Closed
tamuhey opened this issue Jan 25, 2019 · 1 comment · Fixed by #24924
Closed

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

tamuhey opened this issue Jan 25, 2019 · 1 comment · Fixed by #24924
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@tamuhey
Copy link
Contributor

tamuhey commented Jan 25, 2019

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()
@jreback
Copy link
Contributor

jreback commented Jan 25, 2019

try on master please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
2 participants