一.数据库风格的Dataframe合并 import pandas as pd import numpy as np df1 = pd.DataFrame({'1key':['b','b','a','c','a','a','b'], 'data1':np.arange(7)}) df2 = pd.DataFrame({'2key':['a','b','d'], 'data2':np.arange(3)}) df1 df2 pd.merge(df1,df2,left_on='1key',right…