how to map two rows of different dataframe based on a condition in pandas
问题 I have two dataframes, df1, Names one two three Sri is a good player Ravi is a mentor Kumar is a cricketer player df2, values sri NaN sri, is kumar,cricketer player I am trying to get the row in df1 which contains the all the items in df2 My expected output is, values Names sri Sri is a good player NaN sri, is Sri is a good player kumar,cricketer player Kumar is a cricketer player i tried, df1["Names"].str.contains("|".join(df2["values"].values.tolist())) I also tried, but I cannot achieve my