title: Display result of multi index array groupby in pandas dataframe
body: <p>I have a data frame which looks like:</p>
  
  <pre><code>        D        Type    Value    
  0       1        A          2
  1       1        B          4
  2       2        C          1
  3       1        A          1
  </code></pre>
  
  <p>I want to group by D and Type and sum the values.</p>
  
  <pre><code>data=df.groupby(['D','Type']).sum()
  
  print(data)
  </code></pre>
  
  <p>Which gives me this result:</p>
  
  <pre><code>D      Type               Value
  1       A                    3
          B                    4
  2       C                    3
  </code></pre>
  
  <p>But I want it in this format:</p>
  
  <pre><code>D      A         B        C     
  1      3         4        Nan
  2      Nan       Nan      3
  </code></pre>