Reading csv file

Igor Korot ikorot01 at gmail.com
Tue Dec 17 00:20:34 EST 2013


Hi, ALL,
Is there a better way to do that:

def Read_CSV_File(filename):
      file = open(filename, "r")
      reader = csv.DictReader(file)
      line = 1
      for row in reader:
          if line < 6:
             reader.next()
             line++
# process the CSV

Thank you.



More information about the Python-list mailing list