我正在尝试为我的图像分类器构建一个字典,但是当我继续尝试csv的每一行时,出现“数据框没有属性拆分”错误
naimg_dict = {}
f = pd.read_csv(io.BytesIO(uploaded['training.csv']))
fileContents = pd.read_csv(io.BytesIO(uploaded['training.csv']))
fileContents = fileContents.split('\n') #This is where I get the error
for i in range(len(fileContents)-1):
fileContents[i] = fileContents[i].split(',')
naming_dict[fileContents[i][0]] = fileContents[i][1]