better id export

This commit is contained in:
Lukas Z 2022-07-28 16:41:49 +02:00
parent aea10d5f24
commit 5140d88902
1 changed files with 9 additions and 2 deletions

View File

@ -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
tweets_path = "../raw_data/tweets.csv"
output_path = "../raw_data/ids"
tweets = pd.read_csv(tweets_path)
for id in tweets.id:
print(id)
with open(output_path, "w") as f:
f.write("\n".join(tweets.id.astype(str)))