validate_email: to Validate email

Validate Email , more on apply() here.
import pandas as pd
from validate_email import validate_email
df = pd.DataFrame(data=my_email)
df['valid_email'] = df['email'].apply(lambda x:validate_email(x))
print(df[df['valid_email']]) # only valid emails ...
                  email  valid_email
0                  Ravi        False
1         True
2                  Alex        False
3         True
                  email  valid_email
1         True
3         True
If you are getting error saying
ModuleNotFoundError: No module named 'validate_email'
then you have to install validate_email module.
pip install validate_email
Inside Anaconda goto Environment at your left side navigational menu
MySQL installation from Anaconda
Middle you can see Base root
From Base root select Open Terminal
MySQL installation from Anaconda
You will reach the Anaconda terminal where you can install any package .
Installing validate_email
Pandas Pandas DataFrame
contains() to display and delete row based on Conditions
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer