Re: [Tutor] Processing rows from CSV

2009-11-21 Thread Joe Bennett
Doing this a lot in my daily activities... your example > For row in reader: >If row['foo'] == 'something' : >do this etc. 'row' will return a row within 'reader'... You can then pick through the headers like "foo" and see what is there... I have some compare scripts that do exactly

Re: [Tutor] Processing rows from CSV

2009-11-17 Thread Kent Johnson
On Tue, Nov 17, 2009 at 1:57 PM, wrote: > A rather general question, I'm afraid. I have found myself writing some > python code to handle some CSV data, using the csv. DictReader that generates > a dict for each row with the key as the column heading and the value in the > file as the item. M

[Tutor] Processing rows from CSV

2009-11-17 Thread mhw
Dear Tutors, A rather general question, I'm afraid. I have found myself writing some python code to handle some CSV data, using the csv. DictReader that generates a dict for each row with the key as the column heading and the value in the file as the item. Most operations involve code of the fo