Numpy
Numpy (31)
알 수 없는 사용자
2022. 8. 23. 22:04
728x90
How to find the percentile scores of a numpy array?
# Input
url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
sepallength = np.genfromtxt(url, delimiter=',', dtype='float', usecols=[0])
# Solution
np.percentile(sepallength, q=[5, 95])
# output
array([ 4.6 , 7.255])