Created
August 19, 2020 09:20
-
-
Save sid321axn/0d864f35ec98c643d169d82df3064993 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def suspicious_words(url): | |
match = re.search('PayPal|login|signin|bank|account|update|free|lucky|service|bonus|ebayisapi|webscr', | |
url) | |
if match: | |
return 1 | |
else: | |
return 0 | |
df['sus_url'] = df['url'].apply(lambda i: suspicious_words(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment