import csv
with open('dataDusta.csv','r') as csv_file:
csv_reader = csv.reader(csv_file)
with open('new_dataDusta.csv','w') as new_file:
csv_writer = csv.writer(new_file, delimiter = ",")
for line in csv_reader:
csv_writer.writerow(line)
答案 0 :(得分:0)
您在new_file
上进行的所有操作都必须在打开它的with open(
...之内。这包括使用csv_writer
,本身就是使用new_file
。