Commit ece4c353 authored by Francesco Poldi's avatar Francesco Poldi

Fixed typo, dataname, removed attributes

parent 8e9beca8
...@@ -6,7 +6,6 @@ import warnings ...@@ -6,7 +6,6 @@ import warnings
_blocks = [] _blocks = []
def update(Tweet, session): def update(Tweet, session):
day = weekday(strftime("%A", localtime(Tweet.datetime)))
dt = f"{Tweet.datestamp} {Tweet.timestamp}" dt = f"{Tweet.datestamp} {Tweet.timestamp}"
_data = { _data = {
...@@ -18,8 +17,6 @@ def update(Tweet, session): ...@@ -18,8 +17,6 @@ def update(Tweet, session):
"hashtags": Tweet.hashtags, "hashtags": Tweet.hashtags,
"user_id": Tweet.user_id, "user_id": Tweet.user_id,
"username": Tweet.username, "username": Tweet.username,
"day": day,
"hour": hour(Tweet.datetime),
"link": Tweet.link, "link": Tweet.link,
"retweet": Tweet.retweet, "retweet": Tweet.retweet,
"user_rt": Tweet.user_rt, "user_rt": Tweet.user_rt,
...@@ -56,7 +53,9 @@ def save(_filename, _dataframe, **options): ...@@ -56,7 +53,9 @@ def save(_filename, _dataframe, **options):
def read(_filename, **options): def read(_filename, **options):
if not options.get("dataname"): if not options.get("dataname"):
_dataname = "Twint" _dataname = "twint"
else:
_dataname = options.get("dataname")
if not options.get("type"): if not options.get("type"):
_store = pd.HDFStore(_filename) _store = pd.HDFStore(_filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment