We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e735fbb commit c88514fCopy full SHA for c88514f
pandas/core/groupby/generic.py
@@ -2548,7 +2548,7 @@ def idxmax(
2548
2549
>>> df.groupby("food_type").idxmax()
2550
consumption co2_emissions
2551
- animal_type
+ food_type
2552
animal Beef Beef
2553
plant Wheat Products Wheat Products
2554
@@ -2612,9 +2612,9 @@ def idxmin(
2612
2613
By default, it returns the index for the minimum value in each column.
2614
2615
- >>> df.idxmin()
+ >>> df.groupby("food_type").idxmin()
2616
2617
2618
animal Pork Pork
2619
2620
"""
0 commit comments