0

I would like to know how to merge two DataFrames on two columns with similar strings. The DataFrames df1 and df2 look like that:

df1:

number name
50603 Birgkar - Dachegg
12234 Hinterthal

df2:

name temp
Birgkar 18.2
Hinterthal - Maria Alm 19.1
Hinterthal - Maria Alm 18.9

The output df should look like:

number name temp
50603 Birgkar - Dachegg 18.2
12234 Hinterthal - Maria Alm 19.1
12234 Hinterthal - Maria Alm 18.9

Note that the string of the column 'name' in df1 could be a substring of the column 'name' in df2, or vice versa. My final aim is to create a list of temp-values with both numbers and names assigned.

akann
  • 37
  • 4

0 Answers0