Skip to content

Commit

Permalink
Save tmp.csv in tmp folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lladdy committed Sep 19, 2020
1 parent 115b14a commit 731ff1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aiarena/core/stats/stats_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ def _get_data(bot_id):
""")
cursor.execute(query)
elo_over_time = pd.DataFrame(cursor.fetchall())
elo_over_time.to_csv('tmp.csv')
elo_over_time = pd.read_csv('tmp.csv')
# HACK - saving to a csv and loading it back normalizes the time format
elo_over_time.to_csv('./tmp/tmp.csv')
elo_over_time = pd.read_csv('./tmp/tmp.csv')
elo_over_time = elo_over_time.drop('Unnamed: 0', axis=1)
return elo_over_time

Expand Down

0 comments on commit 731ff1f

Please sign in to comment.