title: Pandas random sample with ration 1:1 of specific column entry
body: <p>I have a pandas dataframe object with the columns <code>['text', 'label']</code> with the label being either of value 'pos' or 'neg'.</p>
  
  <p>The problem is that I have way more columns with 'neg' label as I have with 'pos'.</p>
  
  <p>Question now is is there a posibility to randomly select as much 'neg' sentences as 'pos' sentences, so I get a new dataframe with a ratio of 50:50 of both labels?</p>
  
  <p>Do I have to count the 'pos' sentences put them all in a new dataframe and  then do <code>neg_df = dataframe.sample(n=pos_count)</code> and append that to the all positive dataframe created earlier, or is there a faster way?</p>
  
  <p>Thanks for your help.</p>