title: groupby of a groupby to select values in pandas
body: <p>I have a data frame as follows:</p>
  
  <pre><code>marker    date         value       identifier
  
  EA    2007-01-01      0.33            55
  EA    2007-01-01      0.73            56
  EA    2007-01-01      0.51            57
  EA    2007-02-01      0.13            55
  EA    2007-02-01      0.23            57
  EA    2007-03-01      0.82            55
  EA    2007-03-01      0.88            56
  EB    2007-01-01      0.13            45
  EB    2007-01-01      0.74            46
  EB    2007-01-01      0.56            47
  EB    2007-02-01      0.93            45
  EB    2007-02-01      0.23            47
  EB    2007-03-01      0.82            45
  EB    2007-03-01      0.38            46
  EB    2007-03-01      0.19            47
  </code></pre>
  
  <p>Now I want to do a selection on this data frame by value, so I use</p>
  
  <pre><code>df.groupby(marker).get_group('EA')
  </code></pre>
  
  <p>But I also want to get the mean of the value, and notice that I have a duplicated date index, so now I have to do <em>two</em> groupbys because the index is different, leading to </p>
  
  <pre><code>df.groupby(marker).get_group('EA').groupby(df.groupby(marker).get_group('EA').index.date).mean()['value'].plot()
  </code></pre>
  
  <p>what clearly is not really legible. How can I accomplish this without creating a intermediary variable?</p>