Note

Numpy (31) 본문

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])

'Numpy' 카테고리의 다른 글

Numpy (33)  (0) 2022.08.25
Numpy (32)  (0) 2022.08.24
Numpy (30)  (0) 2022.08.22
Numpy (29)  (0) 2022.08.21
Numpy (28)  (0) 2022.08.20
Comments