Python读取CSV文件

import csv


validCodes = []
csvReader = csv.reader(file(u'D:\T201602.csv', 'r'))
for csvLine in csvReader:
    csvLineStr = ','.join(csvLine)
    csvLineValues = csvLineStr.split(',')
    validCodes.append(csvLineValues[3])

你可能感兴趣的:(Python读取CSV文件)