2 Commits 12b7409b5b ... b63e7decb9

Author SHA1 Message Date
  qingfeng b63e7decb9 Merge branch 'dev' of http://git.fast-fun.cn:92/lmstack/data_analyze_platform into dev 2 years ago
  qingfeng 7de2566249 优化金茂空值报错 2 years ago
1 changed files with 3 additions and 0 deletions
  1. 3 0
      LIB/MIDDLE/CellStateEstimation/BatDiag/main.py

+ 3 - 0
LIB/MIDDLE/CellStateEstimation/BatDiag/main.py

@@ -86,6 +86,9 @@ def diag_cal():
                 df_diag_ram_sn.reset_index(inplace=True,drop=True)
                 df_bms_ram_sn=df_bms_ram[df_bms_ram['sn']==sn]
                 df_bms_ram_sn.reset_index(inplace=True,drop=True)
+                
+                df_bms=df_bms.dropna(axis=0,subset=['总电流[A]','SOH[%]','SOC[%]','总电压[V]']) #去除有空值的行
+                df_bms.reset_index(inplace=True,drop=True)     #重置索引
 
                 batquality=CBMSBatDiag.BatDiag(sn,celltype,df_bms,df_diag_ram_sn,df_bms_ram_sn,df_soh,df_uniform)
                 df_diag_res, df_bms_res=batquality.diag()   #获取电池故障结果和电池评分结果