読出し → 行 row[1:] スライスを for ~ in で処理する。
例)
name, point A, 3 B, 2 C, 1
import csv import codecs with codecs.open('sampledata.csv', 'r', 'utf-8') as fp: reader = csv.reader(fp) row = [row for row in reader] for row in row[1:]: print("name=%s point = %d" % (row[0], int(row[1])) )
name=A point = 3 name=B point = 2 name=C point = 1