Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def write_tweets(keyword, file):
  2. #If the file exists, then read the existing data from the CSV file.
  3. if os.path.exists(file):
  4. df = pd.read_csv(file, header=0)
  5. else:
  6. df = pd.DataFrame(columns=COLS)
  7. #page attribute in tweepy.cursor and iteration
  8. for page in tweepy.Cursor(api.search, q=keyword,
  9. count=200, include_rts=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement