Last active
May 22, 2017 22:33
-
-
Save dwo/3eb0a1b200dd3c4916d2fd051ab46ee5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import csv | |
import re | |
tweets = set() | |
with open('tweets.csv', 'rb') as csvfile: | |
reader = csv.reader(csvfile, delimiter=',', quotechar='"') | |
for row in reader: | |
tweet = unicode(row[5], 'utf-8') | |
tweets.add(tweet) | |
with open('tweets.txt', 'w') as out: | |
out.write(str(list(tweets))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment