题解 | #多报名表的运动项目人数统计#
多报名表的运动项目人数统计
https://www.nowcoder.com/practice/423da9d9768243c89e3c724ba7e2ff4d
import pandas as pd items = pd.read_csv('items.csv',sep=',') signup = pd.read_csv('signup.csv',sep=',') signup1 = pd.read_csv('signup1.csv',sep=',') signup_all = pd.concat([signup,signup1]) df = items.set_index('item_id').join(signup_all.set_index('item_id'),on='item_id',how='inner') print(df.groupby('item_name')['name'].count())