I have two data frame columns of different lengths. DF1:
| filename |
|---|
| b~cute |
| b~cute2 |
| nan |
| b~cat |
| b~dog |
| nan |
DF2:
| filename |
|---|
| sgjsg~12345~b~cute~v4.jpeg |
| jgsgj~1233~b~dog~v4.jpeg |
| jhdjd~1252~b~cat~v4.jpeg |
| sggsn~1252~b~cute2~v4.jpeg |
I am trying to do a partial match to create a separate column in DF1 with the filename as such
| filename | filepath |
|---|---|
| b~cute | sgjsg~12345~b~cute~v4.jpeg |
| b~cute2 | sggsn~1252~b~cute2~v4.jpeg |
| nan | nan |
| b~cat | jhdjd~1252~b~cat~v4.jpeg |
| b~dog | jgsgj~1233~b~dog~v4.jpeg |
| nan | nan |
filenamefrom df1 occurs in multiple records of df2?nan, a string orNaN?