Browse Source

获取 rov 数据

罗俊辉 1 năm trước cách đây
mục cha
commit
ca0b3e7d81
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  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