Commit 121f1444 authored by lcn's avatar lcn

BUG修复

parent cbee7a55
...@@ -188,7 +188,10 @@ async def location_stats_statics_new15(table_name, cid, start, end): ...@@ -188,7 +188,10 @@ async def location_stats_statics_new15(table_name, cid, start, end):
else: else:
min_value, min_value_time = "", "" min_value, min_value_time = "", ""
mean_value = df.loc[df["lid"] == lid].value_avg.mean() mean_value = df.loc[df["lid"] == lid].value_avg.mean()
if not pd.isna(mean_value):
mean_value = round(mean_value, 2) if mean_value else "" mean_value = round(mean_value, 2) if mean_value else ""
else:
mean_value = ''
location_map[lid].update({ location_map[lid].update({
"max_value": max_value, "max_value_time": max_value_time, "max_value": max_value, "max_value_time": max_value_time,
"min_value": min_value, "min_value_time": min_value_time, "min_value": min_value, "min_value_time": min_value_time,
......
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