title: Pivot/Reindex the column MultiIndex in this DataFrame?
body: <p>Suppose I have a <code>DataFrame</code> generated by <code>describe()</code> with a <code>MultiIndex</code> in the column index:</p>
  
  <pre><code>txid   FOOBAR                                                           
             count      mean        std    min   25%   50%   75%    max   
  meas 0     233.0  8.064378  76.225789 -127.0 -62.0  14.0  78.0  126.0   
  ...  
  
  txid   DEADBEEF                                                        
             count     mean        std    min    25%  50%    75%    max  
  meas 0     60.0  7.866667  78.921215 -127.0 -55.75  3.0  81.75  126.0  
  ...
  </code></pre>
  
  <p>How can I pop down the 'txid' key down into a <code>DataFrame</code> with twice as many rows:</p>
  
  <pre><code>           txid       count      mean        std    min   25%   50%   75%    max
  meas 0     FOOBAR     233.0  8.064378  76.225789 -127.0 -62.0  14.0  78.0  126.0
  ...
  meas 0     DEADBEEF   60.0  7.866667  78.921215 -127.0 -55.75  3.0  81.75  126.0
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Slight improvement to answer provided by @jezrael:</p>
  
  <pre><code>df1 = df.groupby('txid').apply(lambda x: x.describe())
  # start improvements
  df1.index.rename('idx',level=1,inplace=True)
  df1.reset_index(inplace=True)
  df1 = df1.pivot(columns='txid',index='idx')
  df1 = df1.T
  df.index.rename('meas',level=0,inplace=True)
  </code></pre>