Python3对比合并Excel表格
程序员文章站
2022-09-04 19:12:28
##安装模块pip install pandas as pdpip install xlsxwriterpip install openpyxl ##带入模块import pandas as pdimport xlsxwriterimport openpyxl df1 = pd.read_excel ......
##安装模块
pip install pandas as pd
pip install xlsxwriter
pip install openpyxl
##带入模块
import pandas as pd
import xlsxwriter
import openpyxl
df1 = pd.read_excel('4.xlsx')
df2 = pd.read_excel('4_6f_工位网络面板.xlsx',sheet_name='60-old')
df3=pd.merge(df1,df2,how='left',on='net_int') #按照关键列net_int合并
print(type(df3))
df3.to_excel('88.xlsx',sheet_name='88') #输出excel
上一篇: 带冰的冷料来袭,注意防冻哦
下一篇: mysql服务器主从数据库同步配置