我的代码是
import sys
import csv
import operator
data = csv.reader(open("clean.csv","r"))
sortedlist = sorted(data, key=operator.itemgetter(0))
with open("Final42.csv", "w") as sorter:
fileWriter = csv.writer(sorter)
for row in sortedlist:
fileWriter.writerow(row)
我收到错误 IndexError:列表索引超出范围
样本数据
我的csv文件包含2000行和12列