Articles → Pandas → idxmax function in pandas

idxmax function in pandas






Purpose





Example


import pandas as pd

df = pd.DataFrame({"A": [4, 5, 2, 6], "B": [11, 2, 5, 8], "C": [1, 8, 66, 4]})

df.idxmax()











Output


Picture showing the output of idxmax function in pandas

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, May 16, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250