Browse Source

anomalyPCA更新

zhuxi 3 years ago
parent
commit
ccbcf84960
1 changed files with 2 additions and 1 deletions
  1. 2 1
      LIB/MIDDLE/Anomaly_Detection/V1_0_0/anomalyPCA.py

+ 2 - 1
LIB/MIDDLE/Anomaly_Detection/V1_0_0/anomalyPCA.py

@@ -16,7 +16,8 @@ def makedataset1(df_data):
         df_data=df_data[(df_data['单体电压'+str(i)]>2200) & (df_data['单体电压'+str(i)]<4800)]
     df_data=df_data[df_data['SOC[%]']>20]
     df_data['时间']=[df_data.loc[i,'时间戳'][0:15] for i in df_data.index]
-    data_set=df_data.groupby('时间').mean()
+    df_data=df_data.drop('时间戳',axis=1)
+    data_set=df_data.groupby('时间').mean(False)
     for k in data_set.columns:
         data_set[k]=savgol_filter(data_set[k],3,2)
     return data_set