DF Description:
Pandas DF has two columns 'ID', 'Names', where there are multiple entries of 'Names' for the same 'ID'
Use Case:
IP:
ID Names
1 func_A
1 tunc_B
2 rain
2 fire
Required OP:
A new DF with the entry like following
ID func_A func_B rain fire
1 1 1 0 0
2 0 0 1 1
I tried 2 approaches using groupBy and get_dummies but I am not getting the required op. Any suggestions on how to attain this highly appreciated. thanks.