I have 'df1' with data that look like this:
| Object | Thing |
|---|---|
| apple tini | drink |
| vodka cran | beverage |
| tom collins | alcohol |
| arnie palmer | cocktail |
And I have 'df2' with data that look like this:
| Object1 | Thing1 |
|---|---|
| apple tini | drink |
| vodka cran | bever |
| tom collins | alc |
| arnie palmer | cocktail |
I am looking to check and see if Object and Thing from df1 match any Object1 and Thing1 from df2, and if they do match, a 1 is created in a new column in df1 and if they don't, a 0 is created, so that it looks like this:
| Object | Thing | Value |
|---|---|---|
| apple tini | drink | 1 |
| vodka cran | beverage | 0 |
| tom collins | alc | 0 |
| arnie palmer | cocktail | 1 |
Note that columns are intentionally different in case they don't match is the actual dataframe.
Thank you!