Commit 796841d8 authored by Francesco Poldi's avatar Francesco Poldi

Updated Pandas var names

parent 81f6c2c5
...@@ -26,25 +26,27 @@ weekdays = { ...@@ -26,25 +26,27 @@ weekdays = {
_type = "" _type = ""
def _concat(df, type): def _concat(df, _type):
if df is None: if df is None:
df = pd.DataFrame(_object_blocks[type]) df = pd.DataFrame(_object_blocks[_type])
else: else:
_df = pd.DataFrame(_object_blocks[type]) _df = pd.DataFrame(_object_blocks[_type])
df = pd.concat([df, _df], sort=True) df = pd.concat([df, _df], sort=True)
return df return df
def _autoget(type): def _autoget(_type):
global Tweets_df global Tweets_df
global Follow_df global Follow_df
global User_df global User_df
if type == "tweet": if _type == "tweet":
Tweets_df = _concat(Tweets_df, type) Tweets_df = _concat(Tweets_df, _type)
if type == "followers" or type == "following": elif _type == "followers" or _type == "following":
Follow_df = _concat(Follow_df, type) Follow_df = _concat(Follow_df, _type)
if type == "user": elif _type == "user":
User_df = _concat(User_df, type) User_df = _concat(User_df, _type)
else:
error("[x] Wrong type of object passed")
def update(object, config): def update(object, config):
......
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