20211115
当有空值存在时,四分位数会是空值
20211019
https://www.zhihu.com/question/58421946
https://baike.baidu.com/item/%E5%9B%9B%E5%88%86%E4%BD%8D%E6%95%B0/5040599?fr=aladdin
上四分位数是大的那端
https://jingyan.baidu.com/article/20095761f8299dcb0621b455.html
计算步骤
https://zhuanlan.zhihu.com/p/235345817?utm_source=wechat_session
四分位数
顺序从1开始计数 这里的计算也是不对的,最好按numpy默认的配置计算的结果为准
举例 数列 1 2 3 4 5 6 7 8
上四分位=2x(3-2)*0.75=2.75
第一步 (n+1)/4=求的位置
aa=ndarray=[[1,2,3,4,5,6,7,8,9,10,100],[1,2,2,4,4,4,5,5,5,5,100]]
bb=pd.DataFrame(aa)
min=np.percentile(bb,1,axis=1,interpolation=‘higher’)
max=np.percentile(bb,99,axis=1,interpolation=‘higher’)
1,99 是索引的比例位置
higher lower,是取索引的小值还是大值
官方文档入口:https://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.html