how to convert the format of a dataframe from two rows to single
<p>I have a pandas dataframe with 16 columns and 2 rows (sec01 to sec16 and x_data, y_data)</p>

<p>I want to convert this to another dataframe with 1 row and 32 columns(x_sec01, y_sec01 to x_sec16, y_sec16)</p>

<pre><code>       sec01    sec02   sec03   sec04   sec05   sec06   sec07   sec08   sec09   sec10   sec11   sec12   sec13   sec14   sec15   sec16
x_data  -0  -0  -0  -0  -0  -0  -0  -0  -0  0   0   0   0.557336    0.604719    0.733460    1.019466
y_data  0   0   0   0   0   0   0   0   0   0   0   0   3.212005    2.692938    2.650384    3.085967
</code></pre>

<p>how can this be done in simplest way ?</p>