title: Selecting random rows from pandas dataframe based on counts
body: <p>I have a pandas data frame like below:</p>
  
  <pre><code>col1, col2, label
  a,    b   , cat
  b,    b1, , mouse
  .
  .
  .........., elephant
  .........., mouse
  </code></pre>
  
  <p>and the <code>value_counts</code> for label column:</p>
  
  <pre><code>df.dataframe.value_counts:
  
  cat: 7599
  mouse: 6458
  dog: 5100
  elephant: 5000
  </code></pre>
  
  <p>I want to select at least N rows from each label category at random such that my value_counts become:</p>
  
  <pre><code>cat: N
  mouse: N
  dog: N
  elephant: N
  </code></pre>
  
  <p>Is there a "pandoic" way of doing this?</p>