I'm struggling with next task: I would like to identify using pandas (or any other tool on python) if any of multiple cells (Fruit 1 through Fruit 3) in each row from Table 2 contains in column Fruits of Table1. And at the end obtain "Contains Fruits Table 2?" table.
| Fruits |
|---|
| apple |
| orange |
| grape |
| melon |
| Name | Fruit 1 | Fruit 2 | Fruit 3 | Contains Fruits Table 2? |
|---|---|---|---|---|
| Mike | apple | Yes | ||
| Bob | peach | pear | orange | Yes |
| Jack | banana | No | ||
| Rob | peach | banana | No | |
| Rita | apple | orange | banana | Yes |
Fruits in Table 2 can be up to 40 columns. Number of rows in Table1 is about 300.
I hope it is understandable, and someone can help me resolve this.
I really appreciate the support in advance!