I have the following dataframe in which for col 'email' I am trying to validate if this is a genuine email or not and want to store result in a new column as true or false
email
abc@gmail.com
bcd@ghotmail.de
ddd@yahoo.com
ded@yahoo.in
–≤—ñ–¥—á–µ–Ω–Ω—è ‚Ññ 2971) 2017
,activity
,"null"
the desired output
email valid
abc@gmail.com true
bcd@ghotmail.de true
ddd@yahoo.com true
ded@yahoo.in true
–≤—ñ–¥—á–µ–Ω–Ω—è ‚Ññ 2971). false
,activity false
,"null" false
I am using the following code but the problem is that it is returning everything to be true. I am using the validate_email package
from validate_email import validate_email
df['valid_email'] = df['email'].apply(validate_email)
Why this is not returning the right result here? Any other way of doing this?