title: rewriting a groupby using .agg (lambda) instead of .apply(lambda)
body: <p>Is it possible to re-write the expression below in terms of <code>.agg</code>?</p>
  
  <p>I have </p>
  
  <pre><code>sampleGC.groupby(['prime_broker_id', 'country_name'], as_index=False).apply( lambda df, a, b: sum(df[a] * df[b]),'carry_rate', 'notional_current')
  </code></pre>
  
  <p>which outputs</p>
  
  <pre><code>prime_broker_id  country_name
  CITI             AUSTRALIA       4.929853e+10
                   HONG KONG       2.565716e+11
                   INDONESIA       3.508484e+09
                   JAPAN           9.608675e+11
                   MALAYSIA        9.459922e+10
                   NEW ZEALAND     2.479546e+08
  </code></pre>
  
  <p>I would like to re-write it as:</p>
  
  <pre><code>sampleGC.groupby(['prime_broker_id', 'country_name'], as_index=False).agg(
          {"": lambda }
  </code></pre>
  
  <p>How can I get the same output  (shown above)  by re-writing the groupby in terms of <code>.agg</code> ? 
  I prefer this format as I can easily rename the column and add other operation such as sum and averages</p>
  
  <p>Many Thanks </p>