title: Selecting multiple dataframe columns by position in pandas
body: <p>I have a (large) dataframe.  How can I select specific columns by position?  e.g. columns 1..3, 5, 6</p>
  
  <p>Rather than just drop column4, I am trying to do it in this way because there are a ton of rows in my dataset and I want to select by position:</p>
  
  <pre><code> df=df[df.columns[0:2,4:5]]
  </code></pre>
  
  <p>but that gives <code>IndexError: too many indices for array</code></p>
  
  <p>DF input</p>
  
  <pre><code> Col1     Col2     Col3       Col4        Col5       Col6
   1        apple    tomato     pear        banana     banana
   1        apple    grape      nan         banana     banana
   1        apple    nan        banana      banana     banana
   1        apple    tomato     banana      banana     banana
   1        apple    tomato     banana      banana     banana
   1        apple    tomato     banana      banana     banana
   1        avacado  tomato     banana      banana     banana
   1        toast    tomato     banana      banana     banana
   1        grape    tomato     egg         banana     banana
  </code></pre>
  
  <p>DF output - desired</p>
  
  <pre><code> Col1     Col2     Col3       Col5       Col6
   1        apple    tomato     banana     banana
   1        apple    grape      banana     banana
   1        apple    nan        banana     banana
   1        apple    tomato     banana     banana
   1        apple    tomato     banana     banana
   1        apple    tomato     banana     banana     
   1        avacado  tomato     banana     banana     
   1        toast    tomato     banana     banana     
   1        grape    tomato     banana     banana
  </code></pre>