
a = pd.read_csv(file1, dtype={‘test_id’: object})
df = pd.read_csv(file2, dtype={‘test_id’: object})
================================================== ============
In[28]: pd.merge(a, b, on='test_id', how='left')Out[28]: test_id student_id result0 01 1990 pass1 02 2300 NaN2 003 5555 fail
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)