title: How to reindex data frame in Pandas?
body: <p>I'm using <code>pandas</code> in Python, and I have performed some crosstab calculations and concatenations, and at the end up with a data frame that looks like this:</p>
  
  <pre><code>ID        5    6    7    8     9    10   11   12    13
  Total     87.0  3.0  9.0  6.0  92.0  7.0  3.0  3.0  20.0
  Regular   72.0  2.0  8.0  5.0  81.0  7.0  3.0  3.0  18.0
  CR        22.0  0.0  0.0  0.0  17.0  0.0  0.0  0.0   3.0
  HDG       20.0  0.0  0.0  0.0  24.0  4.0  0.0  0.0   1.0
  PPG       30.0  2.0  8.0  5.0  40.0  3.0  3.0  3.0  14.0
  Superior  15.0  1.0  1.0  1.0  11.0  0.0  0.0  0.0   2.0
  CR         3.0  0.0  0.0  0.0   2.0  0.0  0.0  0.0   0.0
  HDG        5.0  1.0  1.0  1.0   4.0  0.0  0.0  0.0   0.0
  PPG        7.0  0.0  0.0  0.0   5.0  0.0  0.0  0.0   2.0
  </code></pre>
  
  <p>The problem is that I want the last 4 rows, that start with <code>Superior</code> to be places before <code>Total</code> row. So, simply I want to switch the positions of last 4 rows with the 4 rows that start with <code>Regular</code>. How can I achieve this in <code>pandas</code>? So that I get this:</p>
  
  <pre><code>ID        5    6    7    8     9    10   11   12    13
  Total     87.0  3.0  9.0  6.0  92.0  7.0  3.0  3.0  20.0
  Superior  15.0  1.0  1.0  1.0  11.0  0.0  0.0  0.0   2.0
  CR         3.0  0.0  0.0  0.0   2.0  0.0  0.0  0.0   0.0
  HDG        5.0  1.0  1.0  1.0   4.0  0.0  0.0  0.0   0.0
  PPG        7.0  0.0  0.0  0.0   5.0  0.0  0.0  0.0   2.0
  Regular   72.0  2.0  8.0  5.0  81.0  7.0  3.0  3.0  18.0
  CR        22.0  0.0  0.0  0.0  17.0  0.0  0.0  0.0   3.0
  HDG       20.0  0.0  0.0  0.0  24.0  4.0  0.0  0.0   1.0
  PPG       30.0  2.0  8.0  5.0  40.0  3.0  3.0  3.0  14.0
  </code></pre>