📜  计算分位数 python 代码示例

📅  最后修改于: 2022-03-11 14:45:45.684000             🧑  作者: Mango

代码示例1
>>> np.percentile(df.time_diff, 25)  # Q1
0.48333300000000001

>>> np.percentile(df.time_diff, 50)  # Q2 (median)
0.5

>>> np.percentile(df.time_diff, 75)  # Q3
0.51666699999999999