Skip to content

Commit

Permalink
ignore error from startup page
Browse files Browse the repository at this point in the history
  • Loading branch information
tonykipkemboi committed Sep 21, 2022
1 parent c9536de commit bdb5e1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Binary file added app/__pycache__/utils.cpython-310.pyc
Binary file not shown.
15 changes: 9 additions & 6 deletions app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ def data_cleaner(payload: list) -> pd.DataFrame:
df['username'] = ['@'+name for name in df['username']]

# convert to EST time
df['date'] = pd.to_datetime(df['date'], errors='coerce')
df['date'] = df['date'].dt.tz_convert('US/Eastern')
df['date'] = df['date'].dt.strftime("%Y-%m-%d %H:%M:%S")

# drop index column
df = df.reset_index(drop=True)
try:
df['date'] = pd.to_datetime(df['date'], errors='coerce')
df['date'] = df['date'].dt.tz_convert('US/Eastern')
df['date'] = df['date'].dt.strftime("%Y-%m-%d %H:%M:%S")

# drop index column
df = df.reset_index(drop=True)
except:
pass

return df

Expand Down

0 comments on commit bdb5e1b

Please sign in to comment.