I have two df's:
df1:
date point_id
0 2010-10-11 121
1 2010-10-11 433
2 2010-10-11 6618
df2:
id point_id
0 11 433
1 22 121
2 97 6618
Now I want the df to be like:
date point_id cal_id
0 2010-10-11 121 22
1 2010-10-11 433 11
2 2010-10-11 6618 97
What i try:
df1['cal_id'] = df1.where(df1['point_id']==df2['point_id']).notna()
with error:
ValueError: Can only compare identically-labeled Series objects