better id export

This commit is contained in:
Lukas Z 2022-07-28 16:41:49 +02:00
parent aea10d5f24
commit 5140d88902

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 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)))