what's the inverse of the quantile function on a pandas Series?
I had the same question as you did! I found an easy way of getting the inverse of quantile using scipy.
#libs requiredfrom scipy import statsimport pandas as pdimport numpy as np#generate ramdom data with same seed (to be reproducible)np.random.seed(seed=1)df = pd.DataFrame(np.random.uniform(0,1,(10)), columns=['a'])#quantile functionx = df.quantile(0.5)[0]#inverse of quantilestats.percentileofscore(df['a'],x)