-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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
DOC: axis=None does not aggregate along both axes for sum method #54547
Comments
The current behavior is deprecated; in 3.0 explicitly passing axis=None will sum across both axes. A PR making the documentation more clear in the interim would be welcome. |
Hii @rhshadrach ! I'm new to open source and would like to work on this issue. How do I get started? |
Hi @rhshadrach can you assign me this? can do a quick PR |
take |
@rhshadrach I've set up the environment and installed all dependencies, but I'm unsure how to edit docstrings. Should i create a new function and override the the existing sum method? |
@Ishticode , @jbrockmendel , @Brooklynn29 , Do you guys would like to look into this PR? |
DOC: Fix inacurate documentation info (pandas-dev#54547)
take |
I would like to work on it. |
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.sum.html
Documentation problem
The comment under axis parameter states:
For DataFrames, specifying axis=None will apply the aggregation across both axes.
However the following code seems to suggest otherwise.
which returns
and seems to sum just along the row as if we had specified
axis="index"
.In additon to this, the return statement for the sum docs linked above says
scalar or series
. If the above case does not return a scalar then I can't see when it will be scalar otherwise.Note:
mean
.Suggested fix for documentation
remove
For DataFrames, specifying axis=None will apply the aggregation across both axes.
or
make the methods match numpy behaviour which is perhaps a breaking change.
The text was updated successfully, but these errors were encountered: