/ Published in: Python

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def cleanpop(csvReader,parameters): for row in csvReader: fail=False match=True for test in parameters: ind = test[0]; val = test[1] #print "index %i and value %s"%(ind,val) if len(test) > 2: match = (test[2] != "in") if match and row[ind]==val: # print "match" fail=True elif val in row[ind]: # print "in" fail=True if fail: #print "failed row:" #print row continue yield row
Comments
