Python中中位数、百分位数的计算

import numpy as np
a=np.array(([1,2,3,4]))
np.median(a)#中位数
np.percentile(a,95)#95%分位数

你可能感兴趣的:(Python中中位数、百分位数的计算)