title: How to use Pandas Groupby and nlargest
body: <p>I have a Dataframe <code>df</code>, where I am trying to use <code>groupby</code> and <code>nlargest</code> together but am having trouble getting the output I want:</p>
  
  <pre><code>           Date Symbol  Count
  0       2013 Q2   AAAA      8
  1       2013 Q2   BBBB      3
  2       2013 Q2   CCCC      8
  3       2013 Q2   DDDD      4
  4       2013 Q2   EEEE      5
  5       2013 Q3   AAAA     22
  6       2013 Q3   BBBB     11
  7       2013 Q3   CCCC      3
  8       2013 Q3   DDDD     15
  9       2013 Q3   EEEE      2
  10      2013 Q3   FFFF     10
  </code></pre>
  
  <p>I want to use <code>groupby</code> to select by <code>date</code>, then get the top 2 <code>symbols</code> by <code>count</code> for that date, so that the output looks like:</p>
  
  <pre><code>           Date Symbol  Count
  0       2013 Q2   AAAA      8
  2       2013 Q2   CCCC      8
  5       2013 Q3   AAAA     22
  8       2013 Q3   DDDD     15
  </code></pre>
  
  <p>But when I try <code>df = df.groupby(['Date'])['Count'].nlargest(2)</code>, the output looks something like </p>
  
  <pre><code>2013 Q2  0   8
           2   8
  2013 Q3  5   22
           8   15
  
  </code></pre>