df1 = dataframe on the left, df2 = dataframe on the right.
I would like to append iso_alpha and iso_num from df2 to df 1 with condition if df1['Country_Name'] == df2['country'].
The result should look like below.
Country | Year | Month | guest_1 | iso_alpha |iso_num
The Netherlands | 2012 | Jan | 735 | NLD |528
I try with the code below but it getting error message.
new_df = sub.loc[sub['Country_Name'] == df1['country'], df1[:,-2]]
error = ValueError: Can only compare identically-labeled Series objects
Could you please advise how to solve this issue.