title: Python Pandas: How to move one row to the first row of a Dataframe?
body: <p>Given an existing Dataframe that is indexed. </p>
  
  <pre><code>&gt;&gt;&gt; df = pd.DataFrame(np.random.randn(10, 5),columns=['a', 'b', 'c', 'd', 'e'])
  &gt;&gt;&gt; df
            a         b         c         d         e
  0 -0.131666 -0.315019  0.306728 -0.642224 -0.294562
  1  0.769310 -1.277065  0.735549 -0.900214 -1.826320
  2 -1.561325 -0.155571  0.544697  0.275880 -0.451564
  3  0.612561 -0.540457  2.390871 -2.699741  0.534807
  4 -1.504476 -2.113726  0.785208 -1.037256 -0.292959
  5  0.467429  1.327839 -1.666649  1.144189  0.322896
  6 -0.306556  1.668364  0.036508  0.596452  0.066755
  7 -1.689779  1.469891 -0.068087 -1.113231  0.382235
  8  0.028250 -2.145618  0.555973 -0.473131 -0.638056
  9  0.633408 -0.791857  0.933033  1.485575 -0.021429
  &gt;&gt;&gt; df.set_index("a")
                    b         c         d         e
  a                                                
  -0.131666 -0.315019  0.306728 -0.642224 -0.294562
   0.769310 -1.277065  0.735549 -0.900214 -1.826320
  -1.561325 -0.155571  0.544697  0.275880 -0.451564
   0.612561 -0.540457  2.390871 -2.699741  0.534807
  -1.504476 -2.113726  0.785208 -1.037256 -0.292959
   0.467429  1.327839 -1.666649  1.144189  0.322896
  -0.306556  1.668364  0.036508  0.596452  0.066755
  -1.689779  1.469891 -0.068087 -1.113231  0.382235
   0.028250 -2.145618  0.555973 -0.473131 -0.638056
   0.633408 -0.791857  0.933033  1.485575 -0.021429
  </code></pre>
  
  <p>How to move the 3rd row to the first row? </p>
  
  <p>That says, expected result:</p>
  
  <pre><code>                  b         c         d         e
  a                                                
  -1.561325 -0.155571  0.544697  0.275880 -0.451564
  -0.131666 -0.315019  0.306728 -0.642224 -0.294562
   0.769310 -1.277065  0.735549 -0.900214 -1.826320
   0.612561 -0.540457  2.390871 -2.699741  0.534807
  -1.504476 -2.113726  0.785208 -1.037256 -0.292959
   0.467429  1.327839 -1.666649  1.144189  0.322896
  -0.306556  1.668364  0.036508  0.596452  0.066755
  -1.689779  1.469891 -0.068087 -1.113231  0.382235
   0.028250 -2.145618  0.555973 -0.473131 -0.638056
   0.633408 -0.791857  0.933033  1.485575 -0.021429
  </code></pre>
  
  <p>Now the original first row should become the second row.</p>