python

阅读更多
python pandas 列合并亲测可用

import pandas as pd
 
df1 = pd.read_csv(u'input.csv', encoding='gbk')
 
 
df2 = pd.read_csv('input1.csv', encoding='gbk')
 
 
 
outfile = pd.merge(df1, df2, how='left', left_on=u'汉字井号',right_on='WELL')
 
outfile.to_csv('outfile.csv', index=False, encoding='gbk')

 

你可能感兴趣的:(python)