title: Multiple aggregations of the same column using pandas GroupBy.agg()
body: <p>Is there a pandas built-in way to apply two different aggregating functions <code>f1, f2</code> to the same column <code>df[&quot;returns&quot;]</code>, without having to call <code>agg()</code> multiple times?</p>
  <p>Example dataframe:</p>
  <pre><code>import pandas as pd
  import datetime as dt
  import numpy as np
  
  pd.np.random.seed(0)
  df = pd.DataFrame({
           &quot;date&quot;    :  [dt.date(2012, x, 1) for x in range(1, 11)], 
           &quot;returns&quot; :  0.05 * np.random.randn(10), 
           &quot;dummy&quot;   :  np.repeat(1, 10)
  }) 
  </code></pre>
  <p>The syntactically wrong, but intuitively right, way to do it would be:</p>
  <pre><code># Assume `f1` and `f2` are defined for aggregating.
  df.groupby(&quot;dummy&quot;).agg({&quot;returns&quot;: f1, &quot;returns&quot;: f2})
  </code></pre>
  <p>Obviously, Python doesn't allow duplicate keys. Is there any other manner for expressing the input to <code>agg()</code>? Perhaps a list of tuples <code>[(column, function)]</code> would work better, to allow multiple functions applied to the same column? But <code>agg()</code> seems like it only accepts a dictionary.</p>
  <p>Is there a workaround for this besides defining an auxiliary function that just applies both of the functions inside of it? (How would this work with aggregation anyway?)</p>