CSV Reader

Mike P michael.pearmain at tangozebra.com
Mon Feb 11 11:41:54 EST 2008


Cheers for the help, the second way looked to be the best in the end,
and thanks for the boolean idea

Mike



working_CSV =  "//filer/common/technical/Research/E2C/Template_CSV/
DFAExposureToConversionQueryTool.csv"

save_file = open("//filer/common/technical/Research/E2C/Template_CSV/
CSV_Data2.csv","w")

CSV_Data = open(working_CSV)
data = CSV_Data.readlines()
flag=False
for record in data:
    if record.startswith('"Transaction ID"'):
        flag=True
    if flag:
        save_file.write(record)
save_file.close()




More information about the Python-list mailing list