title: Pandas: convert last columns to numeric
body: <p>How can I convert the last two columns to numeric. I don't want to refer to those columns by label, as the structure of the dataframe might change. I always want to update the last two columns.</p>
  
  <p><strong>Source Data</strong></p>
  
  <pre><code>df = pd.DataFrame({
      'a': ['1','2','3','4','5'],
      'b': ['1','2','3','4','5'],
      'c': ['1','2','3','4','5'],
      'd': ['1','2','3','4','5'],
      'e': ['1','2','3','4','5']
  })
  
  
  df
  
      a   b   c   d   e
  0   1   1   1   1   1
  1   2   2   2   2   2
  2   3   3   3   3   3
  3   4   4   4   4   4
  4   5   5   5   5   5
  </code></pre>
  
  <p>Actually, I want to make the following dynamic (always last two columns instead of hardcoded 'd' and 'e')</p>
  
  <pre><code>df[['d', 'e']] = df[['d', 'e']].apply(pd.to_numeric)
  </code></pre>