title: Getting a random sample in Python dataframe by category
body: <p>I have a sample list like this: </p>
  
  <pre><code>Category| Item
  --------|-------
  Animal  | Fish
  Animal  | Cat
  ...     |
  Food    | Fish
  Food    | Cake
  ...     |
  etc...
  </code></pre>
  
  <p>I want to take a random sample of 10 items out of each category, so that the remaining dataframe just has those records. </p>
  
  <p>I've tried <code>df.sample()</code> but it just gives me samples across the board. </p>
  
  <p>I can do this this through <code>df.iterrows()</code> but I am hoping there is a more simple solution. </p>