How to assign labels according to a list in python pandas.Dataframe?
<p>I have two DataFrame, one is 'recipe', the combination of the ingredients, the other is 'like', which contains the popular combinations. </p>

<pre><code>recipe = pd.DataFrame({'A': ['chicken','beef','pork','egg', 'chicken', 'egg', 'beef'],
                       'B': ['sweet', 'hot', 'salty', 'hot', 'sweet', 'salty', 'hot']})
recipe
     A      B
0  chicken  sweet
1     beef    hot
2     pork  salty
3      egg    hot
4  chicken  sweet
5      egg  salty
6     beef    hot 

like = pd.DataFrame({'A':['beef', 'egg'], 'B':['hot', 'salty']})
like
    A      B
0  beef    hot
1   egg  salty
</code></pre>

<p>How can I add a column 'C' to recipe, if the combination listed in 'like', then I give it value 'yes', otherwise 'no'? </p>

<p>The result I want is</p>

<pre><code>recipe
         A      B    C
0  chicken  sweet   no
1     beef    hot  yes
2     pork  salty   no
3      egg    hot   no
4  chicken  sweet   no
5      egg  salty  yes
6     beef    hot  yes
</code></pre>

<p>The problem is my both dataframes are large. I can not manually choose the items in 'like' and assign the 'yes' label in 'recipe'. Are there any easy ways to do that? </p>