title: Transpose DataFrame in Pandas while preserving Index column
body: <p>The problem is, when I transpose the DataFrame, the header of the transposed DataFrame becomes the Index numerical values and not the values in the "id" column. See below original data for examples:</p>
  
  <p><strong>Original data that I wanted to transpose (but keep the 0,1,2,... Index intact and change "id" to "id2" in final transposed DataFrame)</strong>.<br>
  <a href="https://i.stack.imgur.com/y2VFK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2VFK.png" alt="enter image description here"></a>
  <strong>DataFrame after I transpose, notice the headers are the Index values and NOT the "id" values (which is what I was expecting and needed)</strong> 
  <a href="https://i.stack.imgur.com/8UEmJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8UEmJ.png" alt="enter image description here"></a></p>
  
  <p><strong><em>Logic Flow</em></strong></p>
  
  <p>First this helped to get rid of the numerical index that got placed as the header: <a href="https://stackoverflow.com/questions/31520033/how-to-stop-pandas-adding-time-to-column-title-after-transposing-a-datetime-inde">How to stop Pandas adding time to column title after transposing a datetime index?</a></p>
  
  <p>Then this helped to get rid of the index numbers as the header, but now "id" and "index" got shuffled around: <a href="https://stackoverflow.com/questions/31763800/reassigning-index-in-pandas-dataframe">Reassigning index in pandas DataFrame</a> &amp; <a href="https://stackoverflow.com/questions/31763800/reassigning-index-in-pandas-dataframe">Reassigning index in pandas DataFrame</a></p>
  
  <p><a href="https://i.stack.imgur.com/At9Hs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/At9Hs.png" alt="enter image description here"></a> </p>
  
  <p>But now my id and index values got shuffled for some reason.  </p>
  
  <p><strong>How can I fix this so the columns are [id2,600mpe, au565...]?</strong></p>
  
  <p><strong>How can I do this more efficiently?</strong> </p>
  
  <p>Here's my code:</p>
  
  <pre><code>DF = pd.read_table(data,sep="\t",index_col = [0]).transpose() #Add index_col = [0] to not have index values as own row during transposition
  m, n = DF.shape
  DF.reset_index(drop=False, inplace=True)
  DF.head()
  </code></pre>
  
  <p>This didn't help much: <a href="https://stackoverflow.com/questions/9762935/add-indexed-column-to-dataframe-with-pandas">Add indexed column to DataFrame with pandas</a></p>