what's the inverse of the quantile function on a pandas Series?
问题 The quantile functions gives us the quantile of a given pandas series s , E.g. s.quantile(0.9) is 4.2 Is there the inverse function (i.e. cumulative distribution) which finds the value x such that s.quantile(x)=4 Thanks 回答1: I had the same question as you did! I found an easy way of getting the inverse of quantile using scipy. #libs required from scipy import stats import pandas as pd import numpy as np #generate ramdom data with same seed (to be reproducible) np.random.seed(seed=1) df = pd