-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Equivalent to df[:n] for non-negative values too #57305
Comments
Thanks for the report. I believe the intention here is to specifically highlight the behavior for negative values, which users might not consider, rather than to suggest this isn't the behavior for positive values. Do you find this confusing? |
It made me pause to wonder why it was only mentioned in the "negative values" section, worried that implies it does not behave that way for positive values and 0. I think the |
Hi @snoyes and @rhshadrach, I think the examples are quite self-explanatory, what about changing the first part to something like this: This function exhibits the same behavior as When If n is larger... |
Hi @rhshadrach, I've created this morning a PR to improve the definition. However, I see there are some unrelated issues that are preventing the branch to pass the checks. Is there anything I can do? |
The documentation for pandas.DataFrame.head mentions that negative values of n are equivalent to df[:n]. This is true for all values of n.
pandas/pandas/core/generic.py
Lines 5617 to 5618 in 2110b74
The text was updated successfully, but these errors were encountered: