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
[email protected]
[email protected]
[email protected]
[email protected]
–≤—ñ–¥—á–µ–Ω–Ω—è ‚Ññ 2971) 2017
,activity
,"null"
the desired output
email valid
[email protected] true
[email protected] true
[email protected] true
[email protected] 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?