Answers for "idxmax in python"

0

idxmax in python

>>> df.idxmax()
consumption     Wheat Products
co2_emissions             Beef
dtype: object
Posted by: Guest on April-02-2021
0

idxmax in python

>>> df.idxmax(axis="columns")
Pork              co2_emissions
Wheat Products     consumption
Beef              co2_emissions
dtype: object
Posted by: Guest on April-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language