本节讲述对于两个数据集按照相同列的值进行合并. 首先定义原始数据: import pandas as pd import numpy as np data0 = pd.DataFrame({'key': ['K0', 'K1', 'K2', 'K3'], 'A': ['A0', 'A1', 'A2', 'A3'], 'B': ['B0', 'B1', 'B2', 'B3'] }) data1 = pd.DataFrame({'key': ['K0', 'K1', 'K2', 'K3'], 'C'…