I want to do the following merge (hard to describe in words): This are my Dataframes
df8=pd.DataFrame({\'names\':[[\'Hans\',\'Meier\'],[\'Debby\',\'Harry\',\'Pet
You can lookup the values in df9:
df9
df8['contents'] = df8['names'].apply(lambda l: [df9['text'].loc[name] for name in l])