I have two dataframes that look like this:
df1:
Year Week Sales
2019 1 5000
2019 2 6075
2019 3 7435
df2:
Year Week Sales
2018 8 5650
2019 2 7150
Desired output is:
Year Week Sales
2019 1 5000
2019 2 7150
2019 3 7435
I basically want the output to be df1 where the values under "Sales" have been replaced with the values under "Sales" in df2 only if the "Year" and "Week" columns match in both df1 and df2.
How can I go about and do this?