题解 | #统计运动会项目报名人数#

统计运动会项目报名人数

https://www.nowcoder.com/practice/f992129b6da245d5bc5efb2f95289516

import pandas as pd
import numpy as np

items = pd.read_csv("items.csv", sep=",")
signup = pd.read_csv("signup.csv", sep=",")
merged = pd.merge(
    items,
    signup,
    how="inner",
    on="item_id",
    left_on=None,
    right_on=None,
    left_index=False,
    right_index=False,
    sort=True,
    suffixes=("_x", "_y"),
    copy=True,
)
print(merged[merged["item_id"].notnull() == True].groupby("item_name")['employee_id'].count())

全部评论

相关推荐

DBsan:我也遇到过好的HR,全程友好交流。这年头基本的礼貌和尊重为什么好多HR都做不到
找工作时遇到的神仙HR
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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