题解 | #统计鸢尾花数据分位数#

统计鸢尾花数据分位数

http://www.nowcoder.com/practice/e979d1a37b204e2e801669aba5345b04

quantile

quantitle(self, q=0.5, ...)

q : float or array-like, default 0.5 (50% quantile)

If q is an array, a DataFrame will be returned where the index is q, the columns are the columns of self, and the values are the quantiles.

If q is a float, a Series will be returned where the index is the columns of self and the values are the quantiles.

import pandas as pd
iris = pd.read_csv('iris.csv', sep=',')
df = iris.iloc[:,0:4]
print(df.quantile([0.25,0.50,0.75]))
全部评论

相关推荐

不愿透露姓名的神秘牛友
2025-12-19 10:45
秋招路在何方:少了啊,我身边都是350000k*18,发三体货币
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务