I have a dataframe like below:
ID Emp1 Emp2 Emp3
1 John NaN Alex
2 John Steve Alex
3 John Steve Alex
4 Clint Jorge NaN
I would like to convert the above dataframe into something like this:
John Emp1 [1,2,3]
Clint Emp1 [4]
Steve Emp2 [2,3]
Jorge Emp2 [4]
Alex Emp3 [1,2]
So, basically for each column (Emp1, Emp2, Emp3), find "unique" values (drop NaN) and for each unique value, get "ID's" and "column name"