title: Pandas.. does quantile function need sorted data to calculate percentiles?
body: <p>I'm using Pandas to clean up some data and do basic statistics. I am wondering if <code>quantile()</code> does sort the values before the calculation or i must do the sorting beforehand?</p>
  
  <p>For example, here I'm trying to get the 50th percentile of the number of workers in each company</p>
  
  <pre><code>Percentile50th = Y2015_df.groupby (["company"])["worker"].quantile(0.50)
  </code></pre>
  
  <p>I'm asking because when I was verifying the values I got with the results in  MS Excel, I discovered that Median function requires the data to be sorted in order to get the right median. But I'm not sure if its the case in Pandas.</p>