df.describe().loc[['mean','std','25%','50%','75%']]
如何在describe()函数的默认输出属性中添加其他属性,例如10%和90%百分位数?
答案 0 :(得分:0)
在DataFrame.describe
中使用参数percentiles
:
百分位数:类似数字的列表,可选
要包含在输出中的百分比。所有值都应介于0和1之间。默认值为[.25,.5,.75],它返回第25、50和75个百分位数。
df.describe(percentiles=[.1, .25, .5, .75, .9])