title: What's the most efficient way to drop columns (from beginning and end) in pandas from a large dataframe?
body: <p>I am trying to drop a number of columns from the beginning and end of the pandas dataframe. </p>
  
  <p>My dataframe has 397 rows and 291 columns. I currently have this solution to remove the first 8 columns, but I also want to remove some at the end:</p>
  
  <pre><code>SMPS_Data = SMPS_Data.drop(SMPS_Data.columns[0:8], axis=1)
  </code></pre>
  
  <p>I know I could just repeat this step and remove the last few columns, but I was hoping there is a more direct way to approach this problem. </p>
  
  <p>I tried using</p>
  
  <pre><code>SMPS_Data = SMPS_Data.drop(SMPS_Data.columns[0:8,278:291], axis=1)
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>Also, it seems that the .drop method somehow slows down the console responsiveness, so maybe there's a cleaner way to do it?</p>