% <csv # just a silly CSV I got from http://secrets.d8u.us/csv
Secret,Timestamp
Forza la fiera!,1368230474
American healthcare SUXXXXX,1368232342
I am not sure if I wanna take the girl out again,1368240406
I bred a race of intelligent penguin assassins to murder dick cheney. ,1368245584
"I guess it is my mother's time of the month, as it were",1368380424
i've seen walls breath,1368390258
In [33]: %paste
with open('csv', 'rb') as csvfile:
csv_reader = csv.reader(csvfile, dialect='excel') # excel may be the default, but doesn't hurt to be explicit
csv_reader.next()
for row in csv_reader:
array.append(row[1:])
## -- End pasted text --
In [34]: array
Out[34]:
[['1368230474'],
['1368232342'],
['1368240406'],
['1368245584'],
['1368380424'],
['1368390258']]
來源
2013-05-14 17:10:32
hd1
到目前爲止您嘗試過什麼?你看過[csv](http://docs.python.org/2/library/csv.html)模塊嗎? – 2013-05-14 16:46:17
你有多少個?如果是這樣,你不能只刪除第一行和第一列嗎? – 2013-05-14 16:48:22