title: Aggregating lambda functions in pandas and numpy
body: <p>I have an aggregation statement below:</p>
  
  <pre><code>data = data.groupby(['type', 'status', 'name']).agg({'one' : np.mean, 'two' : lambda value: 100* ((value&gt;32).sum() / reading.mean()), 'test2': lambda value: 100* ((value &gt; 45).sum() / value.mean())})
  </code></pre>
  
  <p>I continue to get key errors. I have been able to make it work for one lambda function but not two.</p>