题解 | #Python用户的平均提交次数#
Python用户的平均提交次数
https://www.nowcoder.com/practice/278b129eaadc477ebbd7cb929d4afa6c
思路:先找Python,在求均值,最后输出并保留一位小数
可合起来也可分开写
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') # df = Nowcoder[Nowcoder.Language == 'Python'] # result = df.Number_of_submissions.mean() # print(round(result,1)) print(round(Nowcoder[Nowcoder.Language=='Python']['Number_of_submissions'].mean(),1))
数据分析刷题专栏 文章被收录于专栏
这个专栏就是刷题!刷题!刷题!