题解 | #大佬用户成就值比例#

大佬用户成就值比例

https://www.nowcoder.com/practice/8c0a2d9e77fe45f7b7316226ae213115

import pandas as pd

df = pd.read_csv("Nowcoder.csv", sep=",")
pd.set_option("display.width", 300)  # 设置字符显示宽度
pd.set_option("display.max_rows", None)  # 设置显示最大行
pd.set_option("display.max_columns", None) 
# find all level 7 
df1 = df[df['Level'] == 7]
# sum the total achievement value
sum_all = df['Achievement_value'].sum()
# find the ratio between the ach_value of level 7 and total ach_value
print(df1['Achievement_value']/sum_all)

全部评论

相关推荐

02-13 15:16
三江学院 运营
据说名字越长别人越关注你的昵称我觉得我要被关注了:完全看不出你到底干了什么 全是车轱辘话
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务