title: dataframe pivot with pandas
body: <p>I am trying to pivot df111 into df222:</p>
  
  <p><a href="https://i.stack.imgur.com/CQmFS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CQmFS.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/dHxLj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHxLj.png" alt="enter image description here"></a></p>
  
  <pre><code>   ID1 ID2 Type  Value
  0   1   a    X      1
  1   1   a    Y      2
  2   1   b    X      3
  3   1   b    Y      4
  4   2   a    X      5
  5   2   a    Y      6
  6   2   b    X      7
  7   2   b    Y      8
  
  
  
     ID1 ID2  X Value  Y Value
  0   1   a        1        2
  1   1   b        3        4
  2   2   a        5        6
  3   2   b        7        8
  </code></pre>
  
  <p>I tried with df111.pivot() and df111.groupby() but no luck. Can someone throw me a one-liner? Thanks</p>