Skip to content

Instantly share code, notes, and snippets.

@sid321axn
Created August 19, 2020 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sid321axn/0d864f35ec98c643d169d82df3064993 to your computer and use it in GitHub Desktop.
Save sid321axn/0d864f35ec98c643d169d82df3064993 to your computer and use it in GitHub Desktop.
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