How to join 2 datasets by looking up based on a string (full match or part match)

43 Views Asked by At

I have df1 and df2 datasets. I've list of company in df1 and I've company and company code in df2

if df1 company contains the string (full match or part match) that matches with df2 then bring in company code from df2 to df1

Example of DF1

company
Amazon pvt ltd
Apple pvt ltd td
Microsoft pvt ltd
International Business Machines - IBM

Example of DF2

company company code.
Amazon 1001
IBM 1003
Microsoft pvt ltd 1004

Expected results

company company code
Amazon pvt ltd 1001
Apple pvt ltd
Microsoft pvt ltd 1004
International Business Machines - IBM 1003
0

There are 0 best solutions below