title: Python Pandas - something like ISIN but "contains" vs "exact" match
body: <p>I am using Python Pandas to work with two dataframes. The first dataframe contains records from a <strong>customer database</strong> (First Name, Last Name, Email, etc). The second dataframe contains a list of <strong>domain names</strong>, e.g. gmail.com, hotmail.com, etc.</p>
  
  <p>I am trying to <em>exclude records from the customer dataframe when the email address contains a domain name</em> from the second list. Said another way, I need to remove a customer when their email address domain appears on a domain blacklist.</p>
  
  <p>Here are sample dataframes:</p>
  
  <pre><code>&gt;&gt;&gt; customer = pd.DataFrame({'Email': [
      "bob@example.com", 
      "jim@example.com", 
      "joe@gmail.com"], 'First Name': [
      "Bob", 
      "Jim", 
      "Joe"]})
  
  &gt;&gt;&gt; blacklist = pd.DataFrame({'Domain': ["gmail.com", "outlook.com"]})
  
  &gt;&gt;&gt; customer
           Email First Name
  0  bob@example.com        Bob
  1  jim@example.com        Jim
  2    joe@gmail.com        Joe
  &gt;&gt;&gt; blacklist
    Domain
  0  gmail.com
  1  outlook.com
  </code></pre>
  
  <p>My desired output would be:</p>
  
  <pre><code>&gt;&gt;&gt; filtered_list = magic_happens_here(customer, blacklist)
  &gt;&gt;&gt; filtered_list
      Email First Name
  0 bob@example.com    Bob
  1 jim@example.com    Jim
  </code></pre>
  
  <p>What I've tried so far:</p>
  
  <ol>
  <li>To eliminate <em>specific</em> email addresses, in the past I've used <code>df1[df1['email'].isin(~df2['email'])</code> ... but doesn't help with the use case I'm describing here obviously.</li>
  <li>I've tried using <code>df.apply</code>, but couldn't get the syntax right and I imagine performance would be terrible with the actual data set. Example: <code>df1['Email'].apply(lambda x: x for i in ['gmail.com', 'outlook.com'] if i in x)</code>. Although this seems like it should work, I get <code>TypeError: 'generator' object is not callable</code>. </li>
  </ol>
  
  <p>Remaining questions are:</p>
  
  <ol>
  <li>What's the best approach here?</li>
  <li>Why is the generator not callable?</li>
  <li>... and ultimately, how can I exclude customers from a dataframe when an email address domain exists within an exclusion set?</li>
  </ol>