Pandas setting multi-index on rows, then transposing to columns
<p>If I have a simple dataframe:</p>

<pre><code>print(a)

  one  two three
0   A    1     a
1   A    2     b
2   B    1     c
3   B    2     d
4   C    1     e
5   C    2     f
</code></pre>

<p>I can easily create a multi-index on the rows by issuing:</p>

<pre><code>a.set_index(['one', 'two'])

        three
one two      
A   1       a
    2       b
B   1       c
    2       d
C   1       e
    2       f
</code></pre>

<p>Is there a similarly easy way to create a multi-index on the columns?</p>

<p>I'd like to end up with:</p>

<pre><code>    one A       B       C   
    two 1   2   1   2   1   2
    0   a   b   c   d   e   f
</code></pre>

<p>In this case, it would be pretty simple to create the row multi-index and then transpose it, but in other examples, I'll be wanting to create a multi-index on both the rows and columns.</p>