Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- pattern = "([A-Z0-9._%+-]+)@([A-Z0-9.-]+)"
- # Inserting colum headers, applied after extract
- pattern = "(?P<email>[A-Z0-9._%+-]+)@(?P<domain>[A-Z0-9.-]+)"
- # Generates two columns
- email_components = df["email"].str.extract(pattern, flags=re.IGNORECASE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement