better id export
This commit is contained in:
parent
aea10d5f24
commit
5140d88902
1 changed files with 9 additions and 2 deletions
|
@ -1,8 +1,15 @@
|
||||||
|
"""
|
||||||
|
This script exports tweet ids from tweet dataset so that
|
||||||
|
the generation of the adjacency matrix is reproducable
|
||||||
|
without having to share full text of the uses tweets.
|
||||||
|
"""
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
tweets_path = "../raw_data/tweets.csv"
|
tweets_path = "../raw_data/tweets.csv"
|
||||||
|
output_path = "../raw_data/ids"
|
||||||
|
|
||||||
tweets = pd.read_csv(tweets_path)
|
tweets = pd.read_csv(tweets_path)
|
||||||
|
|
||||||
for id in tweets.id:
|
with open(output_path, "w") as f:
|
||||||
print(id)
|
f.write("\n".join(tweets.id.astype(str)))
|
||||||
|
|
Loading…
Reference in a new issue