查询日志文件最大值,过滤一些无用

import  os
import  csv

csvfile = file('????.csv','rb')
spamreader = csv.reader(csvfile)
datalist = []
for row in spamreader:
   if row[0] == 'InvoiceID':
       global keylist
       keylist =row
       continue
   elif
row[3] == 'Rounding':
       global Rounding
       Rounding = row[18]
       continue
   elif
row[3] == 'InvoiceTotal':
       global  InvoiceTotal
       InvoiceTotal = row[18]
       continue
   elif
row[3] == 'StatementTotal':
       global StatementTotal
       StatementTotal = row[18]
       continue
   else
:
       datalist.append(row[18])
mincost = 0.0000000
for cost in datalist:
   if cost >  mincost:
       mincost = cost
print cost




你可能感兴趣的:(File,最大值,import)