title: Stacking and unstacking
body: <p>I have a data frame with a month-status index:</p>
  
  <pre><code>                            var1          var2
        date status                            
  2003-01-01  foo     5.673044e+12  1.412815e+10
              fubar   5.102315e+11  1.226870e+09
  2003-02-01  foo     4.058879e+12  1.092852e+10
              fubar   5.761504e+11  1.745472e+09
  2003-03-01  foo     6.238392e+12  1.343086e+10
  </code></pre>
  
  <p>To which I want to join a df that contains VALUE with is only date specific. So I do</p>
  
  <pre><code>df = df.unstack(level='status')
  test = df.join(otherDf, how='left')
  </code></pre>
  
  <p>Which works as expected, now I have:</p>
  
  <pre><code>             (var1, foo)  (var1, fubar)   (var2, foo)  (var2, fubar)  VALUE
  date                                                                       
  2003-01-01  5.673044e+12   5.102315e+11  1.412815e+10   1.226870e+09   68.9
  2003-02-01  4.058879e+12   5.761504e+11  1.092852e+10   1.745472e+09   69.2
  2003-03-01  6.238392e+12   8.801683e+11  1.343086e+10   1.165204e+09   68.9
  2003-04-01  6.077365e+12   7.515224e+11  1.228901e+10   1.315599e+09   69.0
  2003-05-01  6.924681e+12   6.021974e+11  1.358737e+10   1.171898e+09   68.8
  </code></pre>
  
  <p>But now I have problems getting it back to the original format:</p>
  
  <p>I naively tried <code>test.stack(level='status')</code>, which gave me </p>
  
  <pre><code>KeyError: 'Level status must be same as name (None)'
  </code></pre>
  
  <p>I suppose the issue is that VALUE does not have an upper level. A similar operation is not described in the <a href="http://pandas.pydata.org/pandas-docs/dev/reshaping.html" rel="nofollow">manual</a>. Isn't there a way to apply <code>stack</code> only to some columns? </p>
  
  <p>My expected output is </p>
  
  <pre><code>                    var                  VALUE
        date  status                            
  2003-01-01  foo     5.673044e+12  1.412815e+10   
              fubar   5.102315e+11  1.412815e+10   
  2003-02-01  foo     4.058879e+12  1.092852e+10   
              fubar   5.761504e+11  1.092852e+10   
  2003-03-01  foo     6.238392e+12  1.343086e+10
  </code></pre>