#Start cleaning loop through all the pings
for P in Pings:
#All beams for current ping
print("Cleansing completed", round(P/len(Pings)*100,1),"%")
Slice_one = df[(df.P==P)&(df.Bm>0)&(df.Bm<257)].copy()
model = LinearRegression().fit(Slice_one.Bm.values.reshape((-1,1)), Slice_one.Z.values)
Slice_one["Z_1"] = model.predict(Slice_one.Bm.values.reshape((-1,1)))
Slice_one("dZ") = abs(Slice_one.Z_1 - Slice_one.Z)
Slice_one_Cor = Slice_one[(Slice_one.dZ < 0.4)]
Slice_one_Cor.drop(["Z_1", "dZ"], axis = 1, inplace = True)
df_Clean = pd.concat([df.Clean, Slice_one_cor], ignore_index = True)
文件“”,第 13 行 Slice_one("dZ") = abs(Slice_one.Z_1 - Slice_one.Z) ^ SyntaxError:无法分配给函数调用
你必须使用方括号[], Slice_one["dZ"] = abs(Slice_one.Z_1 - Slice_one.Z)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句