Re: Blank rows resulting from simple csv script

2007-04-24 Thread John Machin
On 25/04/2007 6:17 AM, Diez B. Roggisch wrote: > Drew schrieb: >> Hi all - >> >> I've written a simple script to read a .csv file and then write out >> rows to a new file only if the value in the 4th column is a 0. Here's >> the code: >> >> import csv >> >> reader = csv.reader(open('table_export.cs

Re: Blank rows resulting from simple csv script

2007-04-24 Thread Michael Bentley
On Apr 24, 2007, at 3:35 PM, Drew wrote: > Hi all - > > I've written a simple script to read a .csv file and then write out > rows to a new file only if the value in the 4th column is a 0. Here's > the code: > > import csv > > reader = csv.reader(open('table_export.csv','rb')) > > writer = csv.wr

Blank rows resulting from simple csv script

2007-04-24 Thread Drew
Hi all - I've written a simple script to read a .csv file and then write out rows to a new file only if the value in the 4th column is a 0. Here's the code: import csv reader = csv.reader(open('table_export.csv','rb')) writer = csv.writer(open('new_jazz.csv','w')) for row in reader: if row

Re: Blank rows resulting from simple csv script

2007-04-24 Thread Diez B. Roggisch
Drew schrieb: > Hi all - > > I've written a simple script to read a .csv file and then write out > rows to a new file only if the value in the 4th column is a 0. Here's > the code: > > import csv > > reader = csv.reader(open('table_export.csv','rb')) > > writer = csv.writer(open('new_jazz.csv',

Blank rows resulting from simple csv script

2007-04-24 Thread Drew
Hi all - I've written a simple script to read a .csv file and then write out rows to a new file only if the value in the 4th column is a 0. Here's the code: import csv reader = csv.reader(open('table_export.csv','rb')) writer = csv.writer(open('new_jazz.csv','w')) for row in reader: if row