merge()函数 merge(left, right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy=True, indicator=False, validate=None) 一、左右连接键名一样 import pandas as pd df1=pd.DataFrame({'key':['a','b','a','b','b'],'value1':range(5)}) df2=pd.