title: Select columns in pandas dataframe by index (column) number
body: <p>I have been mainly an R user up until now, and I am now trying to get better with Python, so please keep that in mind as I may not be thinking in a pythonic way...</p>
  
  <p>In any case, here it goes, I want to subset a pandas dataframe by column position, where I would select for instance, the first 2 columns, the the 4th column, and then the last two columns.</p>
  
  <p>The code I used for that is as follows:</p>
  
  <pre><code>df01 = pd.DataFrame(np.random.randint(low=0, high=10, size=(10, 10)),
                  columns=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i','j'])
  df01.iloc[:,list(range(0,2)) + list([3]) + list(range(-3,-1))]
  </code></pre>
  
  <p>I am doing the subsetting by essentially creating 3 lists with the columns I want, but I am thinking there must be a better way to do this as this appears to me as too cumbersome. In R I could just do a simple:</p>
  
  <pre><code>df01[c(1:2,4,9:10)]
  </code></pre>
  
  <p>Again, this may be just the way it is, but given my status as a python "newbie', Im interested to know if there is a better more concise way.</p>
  
  <p>Thanks,</p>