title: Python pandas - new column's value if the item is in the list
body: <p>I want to create a new column in pandas dataframe. The first column contains names of countries. The list contains countries I am interested in (eg. in EU). The new colum should indicate if country from dataframe is in the list or not.</p>
  <p>Below is the shortened version of the code:</p>
  <pre><code>import pandas as pd
  import numpy as np
  
  EU = [&quot;Austria&quot;,&quot;Belgium&quot;,&quot;Germany&quot;]
  
  df1 = pd.DataFrame(data={&quot;Country&quot;:[&quot;USA&quot;,&quot;Germany&quot;,&quot;Russia&quot;,&quot;Poland&quot;], &quot;Capital&quot;:[&quot;Washington&quot;,&quot;Berlin&quot;,&quot;Moscow&quot;,&quot;Warsaw&quot;]})
  
  df1[&quot;EU&quot;] = np.where(df1[&quot;Country&quot;] in EU, &quot;EU&quot;, &quot;Other&quot;)
  </code></pre>
  <p>The error I get is:</p>
  <blockquote>
  <p>ValueError: The truth value of a Series is ambiguous. Use a.empty,
  a.bool(), a.item(), a.any() or a.all().</p>
  </blockquote>
  <p>I don't know what the problem is and how to solve it. What am I missing?</p>