title: pandas: to_csv with a numeric range of named columns?
body: <p>Is it possible through pd.to_csv to provide a numeric range to the columns argument, even if the headers are labeled with strings?</p>
  
  <p>Sample dataframe:</p>
  
  <pre><code>    January  February  March  April   May  June  July  August  September
  0    67        43       48     58     82    102  118   114     82
  1    45        27       16     12     65    89   112   100     35
  </code></pre>
  
  <p>If I wanted to write out the first eight columns, I would have to use:</p>
  
  <pre><code>pd.to_csv('&lt;filename&gt;',usecols=['January, February, March, April, May, June, July, August'])
  </code></pre>
  
  <p>This obviously takes up a lot of space, and is impractical with dataframes with over a hundred columns. But I can't seem to use a range of columns, or a slice, as an argument:</p>
  
  <pre><code>df.to_csv('filename.csv',columns=list(range(1,9)))
  </code></pre>
  
  <p>This returns <code>KeyError: 'None of [[1, 2, 3, 4, 5, 6, 7, 8]] are in the [columns]'</code>. </p>
  
  <p>I'm sure there's an easy way to do it, I just can't find any similar questions on SO...</p>