题解 | #两份用户信息表格中的查找#
两份用户信息表格中的查找
https://www.nowcoder.com/practice/4c3cbf055f8247bfaeb65270afd2dfe1
# 导入Pandas库 import pandas as pd Nowcoder1 = pd.read_csv("Nowcoder1.csv") Nowcoder2 = pd.read_csv("Nowcoder2.csv") # 注意外连接 Nowcoder_all = pd.merge(Nowcoder1, Nowcoder2, how="outer", on="Nowcoder_ID") name_exercise_submission = Nowcoder_all[["Name", "Num_of_exercise", "Number_of_submissions"]] # 打印结果 print(name_exercise_submission)