当读入文件后,dataframe某一列的数据类型为object,想要转换为数字类型(float) df_valid["val"] = pd.to_numeric(df_valid["val"],errors='coerce')