title: Changing order or row and column labels in pandas dataframe
body: <p>I have the foll. dataframe:</p>
  
  <pre><code>      c3ann c3nfx   c3per   c4ann   c4per   pastr   primf
  c3ann   1    0      1       0       1       0       1
  c3nfx   1    0      1       0       1       0       1
  c3per   1    0      1       0       1       0       1
  c4ann   1    0      1       0       1       0       1
  c4per   1    0      1       0       1       0       1
  pastr   1    0      1       0       1       0       1
  primf   1    0      1       0       1       0       1
  </code></pre>
  
  <p>I would like to reorder the rows and columns so that the order is this:</p>
  
  <pre><code>primf pastr c3ann   c3nfx   c3per   c4ann   c4per
  </code></pre>
  
  <p>I can do this for just the columns like this:</p>
  
  <pre><code>cols = ['primf', 'pastr', 'c3ann',  'c3nfx',    'c3per',    'c4ann',    'c4per']
  df = df[cols]
  </code></pre>
  
  <p>How do I do this such that the row headers are also changed appropriately?</p>