title: Pandas - check if a string column contains a pair of strings
body: <p>Let's say I have a DataFrame like this:</p>
  
  <pre><code>df = pd.DataFrame({'consumption':['squirrel eats apple', 'monkey eats apple', 
                                    'monkey eats banana', 'badger eats banana'], 
                     'food':['apple', 'apple', 'banana', 'banana'], 
                     'creature':['squirrel', 'badger', 'monkey', 'elephant']})
  
      consumption creature    food
  0   squirrel eats apple squirrel    apple
  1   monkey eats apple   badger  apple
  2   monkey eats banana  monkey  banana
  3   badger eats banana  elephant    banana
  </code></pre>
  
  <p>I want to find rows where the 'creature' &amp; 'food' occur in combination in the 'consumption' column i.e. if apple and squirrel occure together, then True but if Apple occur with Elephant it's False. Similarly, if Monkey &amp; Banana occur together, then True, but Monkey-Apple would be false.</p>
  
  <p>The approach I was trying was something like : </p>
  
  <pre><code>creature_list = list(df['creature'])
  creature_list = '|'.join(map(str, creature_list))
  
  food_list = list(df['food'])
  food_list = '|'.join(map(str, food_list))
  
  np.where((df['consumption'].str.contains('('+creature_list+')', case = False)) 
            &amp; (df['consumption'].str.contains('('+food_list+')', case = False)), 1, 0)
  </code></pre>
  
  <p>But this doesn't work since I get True in all instances.</p>
  
  <p>How can I check for string pairs ?</p>