title: pandas aggregate function in groupby - default option?
body: <p>I have the following dataset (<code>df</code>). I want to <code>groupby</code> it using brand as my index, get the mean of workers and value columns and the first count of provider column.</p>
  <pre><code>brand   workers value   provider
  H&amp;M      322    56         mark
  H&amp;M      450    433        mark
  Lindex  678     233        luke
  Lindex  543     456        luke
  Levi    234     32         chris
  Levi    789     12         chris
  </code></pre>
  <p>Now I can</p>
  <pre><code>df = df.groupby('brand')['workers', 'value', 'provider'].agg({'workers': mean,  'value':mean, 'provider' : first).reset_index()
  </code></pre>
  <p>but consider that my real dataset as way more columns I want to take the mean and I don't want to specify each of them, is there a better way of declaring a default function?</p>
  <p>Sort of &quot;take the mean of all the non string columns and the first observation of the string columns?&quot;</p>