# -*- coding: utf-8 -*-
"""
Created on Thu Feb 28 20:46:05 2019
@author: muli
"""
import pandas as pd
# 读取数据
df1=pd.DataFrame(pd.read_excel('总表.xlsx'))
df2=pd.DataFrame(pd.read_excel('样本1.xlsx'))
#数据表匹配合并,inner模式
df_inner=pd.merge(df1,df2,how='left')
#输出到excel格式,保存
df_inner.to_excel('res1.xlsx', sheet_name='1')