title: Pandas - change the order of levels of factor-type object
body: <p>I have a Pandas dataframe <code>df</code> with column <code>school</code> as factor</p>
  
  <pre><code>Name    school
  A       An
  B       Bn
  C       Bn
  </code></pre>
  
  <p>How can I change the levels of the <code>school</code> column from ('An', 'Bn') to ('Bn', 'An') in python?</p>
  
  <p>R equivalent is </p>
  
  <pre><code>levels(df$school) = c('Bn','An')
  </code></pre>