I have the following dataframes:
Dataframe 1:
| Fruit | Vegetable |
|---|---|
| Mango | Spinach |
| Apple | Kale |
| Watermelon | Squash |
| Peach | Zucchini |
Dataframe 2:
| Item | Price/lb |
|---|---|
| Mango | 2 |
| Spinach | 1 |
| Apple | 4 |
| Peach | 2 |
| Zucchini | 1 |
I want to discard the rows from the dataframe 1 when both the columns are not present in the 'Item' series of dataframe 2 and I want to create the following dataframe3 based on dataframes 1 & 2:
| Fruit | Vegetable | Combination Price |
|---|---|---|
| Mango | Spinach | 3 |
| Peach | Zucchini | 3 |
The third column in dataframe 3 is the sum of the item prices from dataframe 2.