-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: iloc docs should indicate a tuple is valid #47799
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
Labels
Comments
Hi, I would to like work on this issue. |
Hi, Could you give an example what would be a 2D-tuple call in this context ? You meant there's an example on the bottom of the page, but I could not find it. Thanks |
df.iloc[1:3, 0:3] In python, that gets translated to You can also do things like |
pratikpatel2512
added a commit
to pratikpatel2512/pandas
that referenced
this issue
Aug 6, 2022
2 tasks
mroeschke
pushed a commit
that referenced
this issue
Aug 8, 2022
noatamir
pushed a commit
to noatamir/pandas
that referenced
this issue
Nov 9, 2022
pandas-dev#47989) DOC: Add tuple description to allowed inputs for iloc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.iloc.html
Documentation problem
In the docs, we say these are valid parameters:
But a 2D tuple is valid as well, as shown in the example at the bottom of the page. So this should be indicated in the docs.
Also, a 1D tuple like
df.iloc[0:2,]
works as well.See discussion in pandas-stubs at pandas-dev/pandas-stubs#152
Suggested fix for documentation
Add tuple description to list at the top.
The text was updated successfully, but these errors were encountered: