 <p>Try this:</p> <pre><code>import pandas as pd df = pd.read_csv("email_addresses_of_ALL_purchasers.csv") all_emails = df["Email"] real_emails = [] test_domains = ['yahoo.com', 'gmail.com', 'facebook.com', 'hotmail.com'] for email in all_emails: email_separated = email.split("@") try: if email_separated[1] not in test_domains: real_emails.append(email) except IndexError: print('Mail {} does not contain a @ sign'.format(email)) print real_emails </code></pre>