Skip to content

Commit

Permalink
assignment and rewrite logs
Browse files Browse the repository at this point in the history
  • Loading branch information
charleshenville committed Jan 23, 2024
1 parent 536f0eb commit a77aaf3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/serv.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
if df.empty:
raise FileNotFoundError()

du.obliterate_long_delta(df, thresh_seconds)

oldlen = len(df)
df = du.obliterate_long_delta(df, thresh_seconds)
if len(df) is not oldlen:
df.to_csv(log_path, encoding='utf-8')

filtered_df = df[['time', 'moisture']]
moist_data = filtered_df.rename(columns={'moisture': 'value'}).to_dict(orient='records')

Expand Down

0 comments on commit a77aaf3

Please sign in to comment.