I have two dataframes.
df1
country_code country
US USA
GB Great Britain
DE Germany
df2
country_code date rainfall
US 1990-01-01 235
GB 1990-01-01 235
DE 1990-01-01 235
US 1990-01-02 235
GB 1990-01-02 235
DE 1990-01-02 235
...
US 2020-01-01 235
GB 2020-01-01 235
DE 2020-01-01 235
I would like to know how to replace the values in df2 country_code to the corresponding values in df1 country.
ie. this is the desired output
country_code date rainfall
USA 1990-01-01 235
Great Britain 1990-01-01 235
Germany 1990-01-01 235
USA 1990-01-02 235
Great Britain 1990-01-02 235
Germany 1990-01-02 235
...
USA 2020-01-01 235
Great Britain 2020-01-01 235
Germany 2020-01-01 235
Basically how map values?