csvpp

csvpp Mercurial Source Tree


Root/csvtest.py

import csv
 
ifile = open("sampledata.csv")
reader = csv.DictReader(ifile)
 
rownum = 0
header = []
 
for r in reader:
    print r
#for row in reader:
#   if rownum == 0:
#       header = row
#   else:
#       colnum = 0
#       for col in row:
#           print "%s => %s" % (header[colnum], col)
#           colnum += 1
#
#   print "\n"
#   rownum += 1
 
ifile.close()
Source at commit 95848a435a01 created 11 years 4 months ago.
By Nathan Adams, changing char to string

Archive Download this file

Branches

Tags

Page rendered in 1.39108s using 11 queries.