print("Orignal missing: %d"% sum(miss_bool))
train.loc[miss_bool,"Item_Weight"] = train.loc[miss_bool,"Item_Identifier"].apply(lambda x: item_avg_weight[x])
print("Final missing: %d"% sum(train["Item_Weight"].isnull()))
TypeError 追溯(最近一次通话) 在 ---->
1 print("Orignal missing: %d"% sum(miss_bool))
2 train.loc[miss_bool,"Item_Weight"] = train.loc[miss_bool,"Item_Identifier"].apply(lambda x: item_avg_weight[x])
3 print("Final missing: %d"% sum(train["Item_Weight"].isnull()))
TypeError:“方法”对象不可迭代