title: Get top n values per category in pandas retaining all columns
body: <p>After some transformations I got the following <code>dataframe</code>, how do I proceed to obtain the top n records by a column in this case <code>short_name</code> and using other as indicator <code>frequency</code>. I read this <a href="https://stackoverflow.com/questions/20069009/pandas-good-approach-to-get-top-n-records-within-each-group">post</a> but the problem with both solutions is that they get rid of the column <code>product_name</code>, they just retain the grouped column and I need to keep them all. </p>
  
  <pre><code>short_name          product_id    frequency
  Yoghurt y cereales  975009684     32
  Yoghurt y cereales  975009685     21
  Yoghurt y cereales  975009700     16
  Yoghurt y Cereales  21097         16
  Yoghurt Bebible     21329         68
  Yoghurt Bebible     21328         67
  Yoghurt Bebible     21500         31
  </code></pre>