Label script for text classification

Hi Team,

need to write a script to populate Y Class Label column from the below table please provide me the script as the out put table as shown below as Label and candidate.

image

try idxmax() function of dataframe ,wish you good luck!
pd=df[‘Candidate Name’,‘DE’,‘DL’,‘ML’,‘NLP’]
pd.apply(lambda x: x[‘DE’,‘DL’,‘ML’,‘NLP’].idxmax(),axis=1)

1 Like

Thank a ton

Screenshot%20from%202019-06-16%2001-14-38

1 Like

Thank a ton

© Copyright 2013-2019 Analytics Vidhya