1# credit to Stack Overflow in the source link
2
3df.head()
4Communications and Search Business General Lifestyle
50 0.745763 0.050847 0.118644 0.084746
60 0.333333 0.000000 0.583333 0.083333
70 0.617021 0.042553 0.297872 0.042553
80 0.435897 0.000000 0.410256 0.153846
90 0.358974 0.076923 0.410256 0.153846
10
11df.idxmax(axis=1)
120 Communications
131 Business
142 Communications
153 Communications
164 Business
17dtype: object