-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
DOC: Improve what the axis= kwarg does for generic methods
#37029
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
Conversation
arw2019
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hongshaoyang for the PR!
I agree this is worth improving. However, I think that a better preposition would be along or over rather than across. See, for example, the numpy docs for np.sum:
https://numpy.org/doc/stable/reference/generated/numpy.sum.html#numpy.sum
I'm -1 on this as is
686560a to
a5afd7f
Compare
|
Thank you @arw2019 for the review! I agree that "over" is clearer, and have changed accordingly. |
rhshadrach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm; I've verified this takes care of all docs that use the phrase "requested axis".
|
can you merge master (and ping on green), we just moved a lot of this around. |
a5afd7f to
f5c58ec
Compare
f5c58ec to
0cd70de
Compare
|
all checks passing @jreback |
|
thanks @hongshaoyang |
axis=0oraxis=1, which is it?Opening a PR to discuss #29203 on what it means to do
df.sum(axis=0)versusdf.sum(axis=1). The docs does not make it intuitively clear to the user. I propose a simple change where "summing acrossaxis=0" makes it clear that you're summing across indexes (i.e. column sums).black pandasgit diff upstream/master -u -- "*.py" | flake8 --diff