浏览代码

获取 rov 数据

罗俊辉 1 年之前
父节点
当前提交
ca0b3e7d81
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      data_process/update_mysql_data.py

+ 4 - 1
data_process/update_mysql_data.py

@@ -63,7 +63,10 @@ class DataProcessor(object):
                 if total_view == 0:
                     label = None
                 else:
-                    label = float(total_return) / float(total_view)
+                    if total_return == 0:
+                        label = None
+                    else:
+                        label = float(total_return) / float(total_view)
             else:
                 label = None
             return label, label_dt