📅  最后修改于: 2022-03-11 14:46:31.275000             🧑  作者: Mango
a = np.intersect1d(df2.columns, df1.columns)
print (a)
['B' 'C']
a = df2.columns.intersection(df1.columns)
print (a)
Index(['B', 'C'], dtype='object')