title: Resampling in scikit-learn and/or pandas
body: <p>Is there a built in function in either Pandas or Scikit-learn for resampling according to a specified strategy?  I want to resample my data based on a categorical variable.</p>
  
  <p>For example, if my data has 75% men and 25% women, but I'd like to train my model on 50% men and 50% women.  (I'd also like to be able to generalize to cases that aren't 50/50)</p>
  
  <p>What I need is something that resamples my data according to specified proportions.</p>