代码 import pandas as pd import numpy as np left=pd.DataFrame({'key':['K0','K1','K2','K3'], 'A':['A0','A1','A3','A3'], 'B':['B0','B1','B2','B3'],}) right=pd.DataFrame({'key':['K0','K1','K2','K3'], 'C':['C0','C1','C3','C3'], 'D':['D0','D1','D2','D3'],})…