1

Given my previous question: Pandas describe vs scipy stats.percentileofscore, I have found that describe (which goes from the desired percentile, and comes up with a data values for it) and percentile of score (which goes from a data value and comes up with a percentile for it) are incompatible, at least when you have small n.

I've noticed that there IS a way to get the describe functionality with interpolation, using pandas.DataFrame.quantile(). However, I haven't found an equivalent of percentileofscore that does interpolation. Is there one?

Community
  • 1
  • 1
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
  • I tried using your 2nd example of that post. From what I observed, `scipy` basically gives you the percentiles for a bandwidth of ranges, especially for the case of non-repeating values. That is to say, when you input 2.0, 2.1,....,2.9, it returns the same percentile regardless of the decimal points present in them. Try it out for yourself and see. The `quantile` or `qcut` methods for that matter is more robust in the sense that it accounts for values of every percentile inputted and changes accordingly. – Nickil Maveli Nov 21 '16 at 16:29
  • yes. But quantile only goes percentile-> value. not value-> percentile. I need to be able to go both ways. – Brian Postow Nov 21 '16 at 17:30
  • So, you want to have a function which can return the percentile upon inputting any value mimicking `percentileofscore`? – Nickil Maveli Nov 21 '16 at 17:46
  • No, percentileofsccore already does that. I want to make percentile of score continuous, interpolated across the intermediate ranges, like quantile does. – Brian Postow Nov 22 '16 at 19:21

0 Answers0