title: Pandas Dataframe wrangling - Python
body: <p>I have a <code>dataframe</code> like below:</p>
  <pre><code>ID Emp1  Emp2 Emp3
  
  1  John NaN Alex
  
  2  John Steve Alex
  
  3  John Steve Alex
  
  4  Clint Jorge NaN
  </code></pre>
  <p>I would like to convert the above dataframe into something like this:</p>
  <pre><code>John Emp1 [1,2,3]
  Clint Emp1 [4] 
  Steve Emp2 [2,3]
  Jorge Emp2 [4]
  Alex Emp3 [1,2]
  
     
  </code></pre>
  <p>So, basically for each column (Emp1, Emp2, Emp3), find &quot;unique&quot; values (drop NaN) and for each unique value, get &quot;ID's&quot; and &quot;column name&quot;</p>