outputDatafile = open('D:\\Files\\input.csv', 'r')
outputReader = csv.reader(outputDatafile, delimiter=',', quoting=csv.QUOTE_NONE)
print "OutputReader data type:",type(outputReader)
inputData= []
//i want to extract all values in csv to array
for row in outputReader:
inputData.append(row)
我有一個CSV文件,如下所示:如何提取CSV文件和存儲的話,列出在Python
名1,value11,value12,value13
名2,value21,value22, value23,value24
NAME3
我想提取和存儲所有項目列出 如:
list[0]=name1
list[1]=value11
list[2]=value12
.
.
.
.
list[5]=name2
list[6]=value21