DA36. 总人数超过5的等级
描述
Python 3 解法, 执行用时: 795ms, 内存消耗: 524288KB, 提交时间: 2022-07-25
import pandas as pd Nowcoder = pd.read_csv("Nowcoder.csv", sep=",") print(Nowcoder.groupby("Level").size() > 5)
Python 3 解法, 执行用时: 797ms, 内存消耗: 524288KB, 提交时间: 2022-08-03
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') df=Nowcoder.groupby('Level').size() df=df[df>5] print(df)
Python 3 解法, 执行用时: 797ms, 内存消耗: 524288KB, 提交时间: 2022-07-25
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') a = Nowcoder.groupby('Level')['Nowcoder_ID'].count() > 5 print(a)
Python 3 解法, 执行用时: 799ms, 内存消耗: 524288KB, 提交时间: 2022-07-25
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') print(Nowcoder.groupby('Level')['Name'].count()>5)
Python 3 解法, 执行用时: 800ms, 内存消耗: 524288KB, 提交时间: 2022-08-06
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') print(Nowcoder.groupby('Level')['Name'].count()>5)