如何在pandas中使用与vlookup类似的功能。
df 1:
AS G DA VV VV
0 potato this is spart today
1 potato surely not the day
2 you retire is it day
df 2:
V V VA ZD VE
0 a does potato even work
1 I am potato even today
2 O how potato mighty have
3 fallen O potato K R
数据框我希望:
V V VA ZD VE
0 a does potato even work
1 I am potato even today
2 O how NaN mighty have
3 fallen O NaN K R
我试过了 -
df1.insert(2, 'VA', df1['AS'].map(df2.set_index('AS')['VA']))
#KeyError#####