Created
August 19, 2020 12:47
-
-
Save sid321axn/b92e7542dc5a4ece63ecf0b00517de96 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
from googlesearch import search | |
def google_index(url): | |
site = search(url, 5) | |
return 1 if site else 0 | |
df['google_index'] = df['url'].apply(lambda i: google_index(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment