-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Closed
Labels
DocsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member
Description
Pandas version checks
- I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.mean.html#pandas.DataFrame.mean
Documentation problem
The second example specifies no axis and shows the mean for each column. According to the documentation above, the behavior when the axis is not specified should be to aggregate the mean over both axis since version 2.0.0
I didn't check if the same mistake is present in other aggregation functions.
Suggested fix for documentation
Replace df.mean()
with df.mean(axis=0)
on the example.
Metadata
Metadata
Assignees
Labels
DocsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member