title: Selecting last n columns and excluding last n columns in dataframe
body: <p>How do I:</p>
  
  <ol>
  <li>Select last 3 columns in a dataframe and create a new dataframe?</li>
  </ol>
  
  <p>I tried:</p>
  
  <pre><code>y = dataframe.iloc[:,-3:]
  </code></pre>
  
  <ol start="2">
  <li>Exclude last 3 columns and create a new dataframe?</li>
  </ol>
  
  <p>I tried:</p>
  
  <pre><code>X = dataframe.iloc[:,:-3]
  </code></pre>
  
  <p>Is this correct?</p>
  
  <p>I am getting array dimensional errors further in my code and want to make sure this step is correct.</p>
  
  <p>Thank you</p>