
Alexandria B. answered 11/02/22
Tutor
New to Wyzant
Carnegie Mellon PhD with 7 years' experience in Statistics
The quantile function from numpy should work for you. Say you have data:
from numpy import quantile
X = np.array([0,1,2,3,4,5])
percentile = .95
result = quantile(X, percentile)
You could use this as a basis for your task.