title: Grouping by multiple criteria in pandas
body: <p>I have a pandas data structure such as this:</p>
  
  <pre><code>&gt;&gt;&gt; df
          Benny  Daniel   Doris   Eric   Jack    Zoe
  Age        75      30      95     25     28     23
  Salary   2000    9000  100000  10000  12000  20000 
  </code></pre>
  
  <p>I would like to find the mean age and salary for several different groups, where each is a subset of the columns, and they may overlap, such as this dictionary for example:</p>
  
  <pre><code>{'Parrot lovers': ['Doris', 'Benny'], 'Tea Drinkers': ['Doris', 'Zoe'],\
   'Maintainance': ['Benny', 'Jack'], 'Coffee Drinkers': ['Benny', 'Eric'],\
   'Senior Management': ['Doris', 'Zoe', 'Jack']}
  </code></pre>
  
  <p>How can I design a groupby function that will do this?</p>