Skip to content

Commit c88514f

Browse files
committed
DOC: fix examples
1 parent e735fbb commit c88514f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/groupby/generic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@ def idxmax(
25482548
25492549
>>> df.groupby("food_type").idxmax()
25502550
consumption co2_emissions
2551-
animal_type
2551+
food_type
25522552
animal Beef Beef
25532553
plant Wheat Products Wheat Products
25542554
@@ -2612,9 +2612,9 @@ def idxmin(
26122612
26132613
By default, it returns the index for the minimum value in each column.
26142614
2615-
>>> df.idxmin()
2615+
>>> df.groupby("food_type").idxmin()
26162616
consumption co2_emissions
2617-
animal_type
2617+
food_type
26182618
animal Pork Pork
26192619
plant Wheat Products Wheat Products
26202620
"""

0 commit comments

Comments
 (0)