I have two data frames as
> df1
A B
1MG 70
ABOF 52
Amazon 12
American Swan 10
Clovia 12
> df2
A B
1 MG Solution
ABOF Prime
Dual Command
Amazon AWF
American Swan Financial Services
Clovia World Spaces
Shape Makers
Unions
I want to return values for partially matched characters from df1
to df2
. For example , Amazon has value 12 in df1
and in df2
i want this value to be returned in front of every string that has Amazon in it. If not found return NA
.
result_df
is the expected output i am expecting .
> reslut_df
A B
1 MG Solution 70
ABOF Prime 52
Dual Command NA
Amazon AWF 12
American Swan Financial Services 10
Clovia World Spaces 12
Shape Makers NA
Unions NA