I have two dataframes A and B. Dataframe A looks like:
col1 col2 col3
a_low 5 6
a_low 3 10
a_high 4 4
Dataframe B looks like:
col1 colB
a 90
Now, I want to merge df A and B on the substring a in col1 from df A and col1 from df B. Hence, the result should be:
col1 col2 col3 colB
a_low 5 6 90
a_low 3 10 90
a_high 4 4 90
Anyone knows how to do this using merge?