I have an example dataframe that has a column which stores 3 letters of the alphabet per row. The dataframe also has 2 additional columns: date and colour:
Alphabet Date Colour
ABC 2018-09-10 green
DEF 2017-06-11 red
GHI 2016-05-12 blue
JKL NA yellow
MNO NA orange
PQR Unknown brown
Some of the dates are missing / unknown in this dataframe. I have another dataframe which also has a alphabet and a date column. This second dataframe includes the dates for the missing dates in the first dataframe:
Alphabet Date
JKL 2017-06-07
MNO 2018-08-03
PQR 2019-10-07
STU 2019-11-08
VWX 2019-12-08
I want to fill in the missing dates from the first dataframe by matching the Alphabet records from both dataframes and then insert the dates from the second dataframe into the first dataframe.
Desired output:
Alphabet Date Colour
ABC 2018-09-10 green
DEF 2017-06-11 red
GHI 2016-05-12 blue
JKL 2017-06-07 yellow
MNO 2018-08-03 orange
PQR 2019-10-07 brown
Any help is appreciated.