title: Pass column index and range simultaneously in Pandas iloc
body: <p>Suppose I have a dataframe with 100 columns. I want to select only 0,1 and 51-100 columns for all rows. I am trying something like this as of now:</p>
  
  <pre><code>df.iloc[:,[0,1,range(51,101)]]
  </code></pre>
  
  <p>But it is throwing error:</p>
  
  <p><strong>"setting an array element with a sequence"</strong></p>
  
  <p>Though it is working if I am passing only range and not column indices. </p>
  
  <p>Also I have tried:</p>
  
  <pre><code>df.iloc[:,[0,1,51:102)]]
  </code></pre>
  
  <p>It is showing invalid syntax.</p>
  
  <p>Can somebody please point out mistake here. Also please suggest alternative way to achieve functionality. </p>