zhuxi 2 years ago
parent
commit
516f99f011
1 changed files with 1 additions and 1 deletions
  1. 1 1
      LIB/MIDDLE/Anomaly_Detection/V1_0_0/main_detection.py

+ 1 - 1
LIB/MIDDLE/Anomaly_Detection/V1_0_0/main_detection.py

@@ -87,7 +87,7 @@ for k in range(l):
                         level=4
                         info='热失控预警'
                         advice='建议返厂维修'
-                        df_res=df_res.append([start_time, end_time,product_id, code, level, info,advice])    
+                        df_res=df_res.append({'start_time':start_time, 'end_time':end_time,'product_id':product_id, 'code':code, 'level':level, 'info':info,'advice':advice},ignore_index=True)
                         with open(r'D:\Platform\platform_python\data_analyze_platform\USER\spf\01qixiang\06BatSafetyAlarm\热失控报警.txt','a') as file:
                             file.write(str(tuple(df_res.iloc[-1]))+'\n')    
                     else: