title: Select top 10 records for each category python
body: <p>How do I groupby a column and get the top 10 records in each of the categories in that column? </p>
  
  <p>The column I want to groupby has 3 categories 'high', 'med' and 'low'.</p>
  
  <p>I have another column with numeric data that I'm using to rank the data.</p>
  
  <p>Here is the head of my dataframe:</p>
  
  <pre><code>country   designation     points    province               title             year    price   price_category
  Italy     Vulkà Bianco     98        Sicily     Nicosia 2013 Vulkà Bianco    2013     65     high
  </code></pre>
  
  <p>My code here returns the top 2 from the numeric column, but I'm losing all the other columns. Is there a way to do it without losing the other columns?</p>
  
  <pre><code>df.groupby('price_category')['points'].nlargest(2)
  </code></pre>
  
  <p>Here is my output I've lost all the other columns:</p>
  
  <pre><code>category_column        
  high        36528     100
              42197     100
  low         5011       95
              15196      95
  med         114981     97
              9901       96
  </code></pre>
  
  <p>I need this ^ but without losing my other columns.</p>