How can I rearrange a DataFrame with Pandas?
<p>I have a DataFrame:</p>

<pre><code>                 Amount                           dwy                                         bmd
Portfolio   EUR GBP JPY USD                 EUR GBP JPY USD                          EUR    GBP JPY USD
date
2016-05-13  100 200 300 400                -0.5 0.5 0   0.8                          3.8    3   0   3
</code></pre>

<p>and I would like to transfer it to this:</p>

<pre><code>date        ccy             amt       dwy   bmd
2016-05-13  EUR             100      -0.5   3.8
2016-05-13  GBP             200       0.5   3
2016-05-13  JPY             300       0     0
2016-05-13  USD             400       0.8   3
</code></pre>

<p>I have tried <code>df.stack()</code> and <code>df.unstack</code> and also <code>df.T</code> in a variety of ways.  Other than pull this apart piece by piece and reassemble is is there a more optimal way?</p>