title: Make pandas df in wide format and unconcatenate values to different columns
body: <p>sorry, I have a bit of a trouble explaining the problem in title</p>
  
  <p>By accident we pivoted our Pandas Dataframe  to this: </p>
  
  <pre><code>df = pd.DataFrame(np.array([[1,1,2], [1,2,1], [2,1,2], [2,2,2],[3,1,3]]),columns=['id', '3s', 'score'])
  
  id   3s  score
  1    1   2
  1    2   1
  2    1   2             
  2    2   2                 
  3    1   3
  </code></pre>
  
  <p>But we need to unstack this so df will look like this (the original version): The '3s' column 'unpivots' to the discrete set by 3 ordered columns with 0s and 1s, which add in order. So if we had <code>'3s'= 2</code> with <code>'score'= 2</code> the values will be <code>[1,1,0]</code> (2 out of 3 in order) in columns <code>['4','5','6']</code> (second set of 3s) for corresponding <code>id</code></p>
  
  <pre><code>df2 = pd.DataFrame(np.array([[1,1,1,0,1,0,0], [2,1,1,0,1,1,0], [3,1,1,1,np.nan,np.nan,np.nan] ]),columns=['id', '1', '2','3','4','5','6'])
  
  id   1   2   3   4   5   6
  1    1   1   0   1   0   0
  2    1   1   0   1   1   0      
  3    1   1   1 
  </code></pre>
  
  <p>Any help greatly appreciated! 
  <em>(please save me)</em></p>