瀏覽代碼

更新end_time写入问题

qingfeng 2 年之前
父節點
當前提交
b9b4bee096
共有 2 個文件被更改,包括 9 次插入26 次删除
  1. 3 3
      LIB/MIDDLE/SaftyCenter/DataDiag_Static/DiagDataMerge.py
  2. 6 23
      LIB/MIDDLE/WinterCharging/V1_0_1/main.ipynb

+ 3 - 3
LIB/MIDDLE/SaftyCenter/DataDiag_Static/DiagDataMerge.py

@@ -29,8 +29,8 @@ class DiagDataMerge():
                     
         print('处理后',df_Diag_Cal_unfinish)
         df_Diag_Cal_Update=pd.concat([df_Diag_Cal_finish,df_Diag_Cal_unfinish])    
-        df_Diag_Ram_add = pd.concat([df_Diag_Cal_Update,df_Diag_Ram_sn,df_Diag_Ram_sn]).drop_duplicates(subset=['start_time','code'],keep=False)#此次判断中新增故障
-        df_Diag_Ram_Update_old = pd.concat([df_Diag_Cal_Update,df_Diag_Ram_add,df_Diag_Ram_add]).drop_duplicates(subset=['start_time','code'],keep=False)#此次判断中新增故障
-        df_Diag_Ram_Update_change = pd.concat([df_Diag_Ram_Update_old,df_Diag_Ram_sn,df_Diag_Ram_sn]).drop_duplicates(subset=['start_time','code','Batpos'],keep=False)#此次判断中新增故障
+        df_Diag_Ram_add = pd.concat([df_Diag_Cal_Update,df_Diag_Ram_sn,df_Diag_Ram_sn]).drop_duplicates(subset=['start_time','code'],keep='first')#此次判断中新增故障
+        df_Diag_Ram_Update_old = pd.concat([df_Diag_Cal_Update,df_Diag_Ram_add,df_Diag_Ram_add]).drop_duplicates(subset=['start_time','code'],keep='first')#此次判断中新增故障
+        df_Diag_Ram_Update_change = pd.concat([df_Diag_Ram_Update_old,df_Diag_Ram_sn,df_Diag_Ram_sn]).drop_duplicates(subset=['start_time','code','Batpos'],keep='first')#此次判断中新增故障
         # df_Diag_Ram = pd.concat([df_Diag_Ram_sn_else,df_Diag_Cal_unfinish])    
         return df_Diag_Ram_add,df_Diag_Ram_Update_change

文件差異過大導致無法顯示
+ 6 - 23
LIB/MIDDLE/WinterCharging/V1_0_1/main.ipynb


部分文件因文件數量過多而無法顯示