I am trying to merge two data frames where df1 column A contains substring of df2 column B.
for example
df1:
columnA Actual
AB Apple
CD Straw
EF Ele
df2:
ColumnB Values
UserAB 1
UserCD 2
UserEF 3
UserGH 4
UserIJ 5
I am looking for output like below, can't able to identify how can I get this done.
Output:
ColumnB Values ColumnA Actual
UserAB 1 AB Apple
UserCD 2 CD Straw
UserEF 3 EF Ele
UserGH 4 NaN NaN
UserIJ 5 NaN NaN
ColumnAand strings inColumnBfixed length or they vary?