-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fix EX01 in pandas.DataFrame.idxmax #32551
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
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 @farhanreynaldo , just suggesting some very minor changes
pandas/core/frame.py
Outdated
Wheat Products 103.11 19.66 | ||
Beef 55.48 1712.00 | ||
|
||
By default, it returns index for the maximum value in each columns. |
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.
By default, it returns the index for the maximum value in each column.
pandas/core/frame.py
Outdated
co2_emission Beef | ||
dtype: object | ||
|
||
To return index for the maximum value in each rows, use ``axis="columns"``. |
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.
To return the index for the maximum value in each row, use ``axis="columns"``.
pandas/core/frame.py
Outdated
|
||
Examples | ||
-------- | ||
Consider dataset containing food consumption in Argentina. |
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.
Consider a dataset containing food consumption in Argentina.
pandas/core/frame.py
Outdated
Consider dataset containing food consumption in Argentina. | ||
|
||
>>> df = pd.DataFrame({'consumption': [10.51, 103.11, 55.48], | ||
... 'co2_emission': [37.2, 19.66, 1712]}, |
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.
... 'co2_emissions': [37.2, 19.66, 1712]},
(this will have to change in the other parts too)
Thanks for the input, @MarcoGorelli! |
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 @farhanreynaldo, nice example.
Thanks @farhanreynaldo |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Related to #27977.