sciPy stats.scoreatpercentile() function | Python
scipy.stats.scoreatpercentile(a, score, kind='rank') function helps us to calculate the score at a given percentile of the input array. The score at percentile = 50 is the median. If the desired quantile lies between two data points, we interpolate between them, according to the value of interpolati