Python的报错:Value error:could not convert string to float,跪求大神指点

PYTHON报错:Value error:could not convert string to float
Python的报错:Value error:could not convert string to float,跪求大神指点_第1张图片
TXT文件Python的报错:Value error:could not convert string to float,跪求大神指点_第2张图片
TXT文件读取的代码:
txt = np.loadtxt(‘E:\DataSet\CCTSDB\GroundTruth\GroundTruth.txt’)
txtDF = pd.DataFrame(txt)
txtDF.to_csv(‘file1.csv’, index=False)
def csv_data():
csv_data = pd.read_csv(“file1.csv”, names=[“file_num”,“labels”,“style”], index_col=“file_num”)
labels = []
labels = csv_batch_data[list(range(1,4))]
return csv_data
def filename2label(filename, csv_data):
labels = []
for file_name in filename:
file_num = “”.join(list(file_name))
target = csv_data.loc[int(file_num),“label”]
labels.append(target)
return np.array(labels)

你可能感兴趣的:(Python的报错:Value error:could not convert string to float,跪求大神指点)