title: pandas dataframe groupby by column position
body: <p>I have a function that does group by on a pandas dataframe. The problem is my dataframe can have variable number of columns. I want to aggregate: sum the last column by the first column. The name of the last column is different, but, the name of the first column is fixed.</p>
  
  <p>How could I achieve the group by? I tried using iloc and by getting the column name of the last column using df.columns[-1], but, none of these tricks seem to work.</p>
  
  <p>Are there any better ways to achieve this than changing the last column name to some common value?</p>