title: pandas custom aggregation function
body: <p>I have a pandas dataframe, which the following command works on:</p>
  
  <pre><code>house.groupby(['place_name'])['index_nsa'].agg(['first','last'])
  </code></pre>
  
  <p>It gives me what I want. Now I want to make a custom aggregation value that gives me the percentage change between the first and the last value.</p>
  
  <p>I got an error for doing math on the values, so I assumed that I have to turn them into numbers.</p>
  
  <pre><code>house.groupby(['place_name'])['index_nsa'].agg({"change in %":[(int('last')-int('first')/int('first')]})
  </code></pre>
  
  <p>Unfortunately, I only get a syntax error on the last bracket, which I cannot seem to find the error. </p>
  
  <p>Does someone see where I went wrong ? </p>