TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely 原来的写法: np.isnan(df['E'][i]) df['E'][i]里面的内容是字符串,报错提示输入类型的问题,因此我换了pandas的 改成: pd.isna(data['E'][i])