DA20. 牛客用户刷题量的方差与提交次数的标准差
描述
Python 3 解法, 执行用时: 788ms, 内存消耗: 524288KB, 提交时间: 2022-07-21
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') data1=Nowcoder['Num_of_exercise'].var() data2=Nowcoder['Number_of_submissions'].std() print(round(data1,2),'\n',round(data2,2))
Python 3 解法, 执行用时: 795ms, 内存消耗: 524288KB, 提交时间: 2022-07-24
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') # var print(Nowcoder['Num_of_exercise'].var().round(2)) # std print(Nowcoder['Number_of_submissions'].std().round(2))
Python 3 解法, 执行用时: 797ms, 内存消耗: 524288KB, 提交时间: 2022-07-24
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') #print(round(Nowcoder["Num_of_excercise"].var(),2),"\n",round(Nowcoder["Number_of_submissions"].std()),2) print(round(Nowcoder['Num_of_exercise'].var(),2),'\n',round(Nowcoder['Num_of_exercise'].std()),2)
Python 3 解法, 执行用时: 800ms, 内存消耗: 524288KB, 提交时间: 2022-07-25
import pandas as pd Nowcoder = pd.read_csv("Nowcoder.csv", sep=",") print(round(Nowcoder["Num_of_exercise"].var(), 2)) print(round(Nowcoder["Num_of_exercise"].std(), 2))
Python 3 解法, 执行用时: 800ms, 内存消耗: 524288KB, 提交时间: 2022-07-25
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') a=Nowcoder["Num_of_exercise"].var().round(2) b=Nowcoder["Number_of_submissions"].std().round(2) print(a) print(b)