title: Visualize columns by top n results on Grouped dataframe
body: <p>I have below 2 dataframes, First dataframe <code>df1</code> tells how many records are there for each month in second <code>df2</code>.<br>
  (JFYI, <code>df1</code> is calculated from <code>df2</code> itself and grouped it by month to maintain the counts) </p>
  
  <pre><code>mainid  counts          month  
      1   13              JAN   
      2   15              JAN
      3   10              JAN 
      2   10              FEB
      3   5               FEB
      1   12              MAR     
  </code></pre>
  
  <p>second df </p>
  
  <pre><code>mainid  stamp A                Value       month 
  1       '2012-01-08 18:15:05'  'Value 01'   JAN
  1       '2012-03-08 19:15:05'  'Value 02'   MAR
  #... 25 (13+12 records for mainid 1 for JAN and MAR months of 2012)
  2       '2012-01-08 18:15:05'  'Value 01'    JAN
  2       '2012-02-08 19:15:05'  'Value 04'    FEB
  #... 25 (15+10 records for mainid 2 for JAN and FEB months of 2012)
  3       '2012-01-08 19:15:05'  'Value 06'    JAN
  3       '2012-02-08 12:15:05'  'Value 06'    FEB
  #... 15 (10+5 records for mainid 3 for JAN and FEB months of 2012)
  </code></pre>
  
  <p>Now, from <code>df2</code>, I want to show top 3 stamps and top 3 <code>values</code> in the <code>df1</code>.
  I can calculate top3 like this, (but this would not be feasible for each <code>mainid</code>)</p>
  
  <pre><code>top3_stamps = df[df['mainid' == 1]].sort_values(['month','stamp A']).head(3)
  top3_values = df[df['mainid' == 1]].sort_values(['month', 'Value']).head(3)
  </code></pre>
  
  <p>I am not getting, how can I find those top3 results for each <code>mainid</code> and combine it with <code>df1</code></p>