On Tue, Oct 27, 2009 at 10:14 AM, Dave Angel wrote:
>
> But if the file contained 0.00 as one of its items, this code would still
> have the other problem I mentioned.
>
> DaveA
> ___
> Tutor maillist - tu...@python.org
> To unsubscribe or change sub
On Tue, Oct 27, 2009 at 10:14 AM, Dave Angel wrote:
> Benno Lang wrote:
>>
>> On Tue, Oct 27, 2009 at 8:21 AM, Dave Angel wrote:
>>
>>>
>>> I agree with Luke's comments. But I'd like to point out an apparent bug
>>> (I
>>> haven't tried the code, this is just by inspection).
>>>
>>> You use the
Benno Lang wrote:
On Tue, Oct 27, 2009 at 8:21 AM, Dave Angel wrote:
I agree with Luke's comments. But I'd like to point out an apparent bug (I
haven't tried the code, this is just by inspection).
You use the test
if '0' in row[.]
that's not going to check for a zero value, it's g
On Tue, Oct 27, 2009 at 8:21 AM, Dave Angel wrote:
> I agree with Luke's comments. But I'd like to point out an apparent bug (I
> haven't tried the code, this is just by inspection).
>
> You use the test
> if '0' in row[.]
>
> that's not going to check for a zero value, it's going to chec
"Eduardo Vieira" wrote
def zerofound(csvfile, outputfile, lastcolumn ):
"""Finds columns with zero prices. Column have 0 index"""
final = csv.writer(open(outputfile, 'wb'), dialect='excel')
reader = csv.reader(open(csvfile, 'rb'), dialect='excel')
for row in reader:
if '0'
Luke Paireepinart wrote:
On Mon, Oct 26, 2009 at 2:08 PM, Eduardo Vieira wrote:
Hello, I need your help in designing a function. I have created this
script to check out if certain column in some csv files has value "0":
import csv
def zerofound(csvfile, outputfile, lastcolumn ):
"""Find
On Mon, Oct 26, 2009 at 2:08 PM, Eduardo Vieira wrote:
> Hello, I need your help in designing a function. I have created this
> script to check out if certain column in some csv files has value "0":
>
> import csv
>
> def zerofound(csvfile, outputfile, lastcolumn ):
>"""Finds columns with zero
Hello, I need your help in designing a function. I have created this
script to check out if certain column in some csv files has value "0":
import csv
def zerofound(csvfile, outputfile, lastcolumn ):
"""Finds columns with zero prices. Column have 0 index"""
final = csv.writer(open(outputf