negids = movie_reviews.fileids('neg')
posids = movie_reviews.fileids('pos')
for f in negids:
with open(fileids=[f], "rb") as infile, open(fileids=[f], 'wb') as outfile:
in_txt = csv.reader(infile, delimiter = '\t')
out_csv = csv.writer(outfile)
out_csv.writerow(in_txt)
谁能帮忙我正在尝试读取电影评论语料库的 neg 文件夹中的每个文件,并希望将该文件的完整数据作为一行插入到 Excel 表中