title: Python: Generate random values from empirical distribution
body: <p>In Java, I usually rely on the <a href="http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/random/EmpiricalDistribution.html" rel="noreferrer">org.apache.commons.math3.random.EmpiricalDistribution</a> class to do the following:</p>
  
  <ul>
  <li>Derive a probability distribution from observed data.</li>
  <li>Generate random values from this distribution.</li>
  </ul>
  
  <p>Is there any Python library that provides the same functionality? It seems like <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.resample.html#scipy.stats.gaussian_kde.resample" rel="noreferrer">scipy.stats.gaussian_kde.resample</a> does something similar, but I'm not sure if it implements the same procedure as the Java type I'm familiar with.</p>