title: Logical Or/bitwise OR in pandas Data Frame
body: <p>I am trying to use a Boolean mask to get a match from 2 different dataframes.
  U</p>
  
  <p>Using the logical OR operator:</p>
  
  <pre><code>x = df[(df['A'].isin(df2['B']))
        or df['A'].isin(df2['C'])]
  
  Output:
  
  ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
  </code></pre>
  
  <p>However using the bitwise OR operator, the results are returned successfully. </p>
  
  <pre><code>x = df[(df['A'].isin(df2['B']))
        | df['A'].isin(df2['C'])]
  
  Output: x
  </code></pre>
  
  <p>Is there a difference in both and would bitwise OR be the best option here? Why doesn't the logical OR work?</p>