title: Rearrange columns using column numbers- Pythonic way
body: <p>Rearranging columns in pandas has been asked before in many <a href="https://stackoverflow.com/questions/12329853/how-to-rearrange-pandas-column-sequence">threads</a>. </p>
  
  <p>I can <code>print</code> my columns and copy paste whatever I need to reorder in <code>pandas</code>. However, I am wondering if I have more than 20 columns, can I rearrange using columns numbers? I know in <code>R</code> this can be done something like this,</p>
  
  <pre><code>new_df &lt;- my_df[,c(1:9, 11:21, 10)]
  </code></pre>
  
  <p>I attempted the same below in <code>pandas</code>, but getting a <code>SyntaxError</code>,</p>
  
  <pre><code>new_df = my_df[[:, 1:9, 11:21, 10]]
  </code></pre>
  
  <p>I have been searching and could not find a document to refer to get an answer. Is there anything like that in <code>pandas</code> that I can do in one line like in <code>R</code>? </p>