title: Aggregated Dataframe with filters
body: <p>Is it possible in pandas to do a filter with the method &quot;NamedAgg'?</p>
  <p>Here is my example code:</p>
  <pre><code>df = pd.DataFrame({'Person': ['John','Paul','John','Paul','Taylor'],
                     'animal': ['cat', 'dog', 'cat', 'dog','dog'],
                     'from' : ['breeder','adoption','adoption','breeder','wild'],
                     'height': [9.1, 6.0, 9.5, 34.0,55],
                     'weight': [7.9, 7.5, 9.9, 198.0,200]})
  
  df.groupby(['Person']).agg(
      number_of_animal = pd.NamedAgg(column = 'animal', aggfunc = 'count'),
      number_of_from = pd.NamedAgg(column = 'from', aggfunc = 'count'),
      total_height = pd.NamedAgg(column = 'height', aggfunc = 'sum'),
      total_weight = pd.NamedAgg(column = 'weight', aggfunc = 'sum')
      )
  
  result = pd.DataFrame({'Person': ['John','Paul','Taylor'],
                          'number_of_animal':[2,0,0],
                          'number_of_from': [1,1,0],
                          'total_height':[0,34,55],
                          'total_weight':[17.8,205.5,200]})
  </code></pre>
  <p>For each individual column I would like to apply a filter, for example I would like to filter where for &quot;number_of_animal&quot; <code>df['animal'] == 'cat'</code> and &quot;total_hight&quot; <code>df['height'] &gt; 10</code> and number_of_from <code>df['from'] == 'breeder</code></p>