How to get list of all columns corresponding to maximum value in each row in a Dataframe? For example, if I have this dataframe,
df = pd.DataFrame({'a':[12,34,98,26],'b':[12,87,98,12],'c':[11,23,43,1]})
a b c
0 12 12 11
1 34 87 23
2 98 98 43
3 26 12 1
I want to make another dataframe as shown below,
0 [a,b]
1 [b]
2 [a,b]
3 [a]
How can I do that?
