예제 #1
0
def registration_table_read(file, fieldnames, rows):
    with open(file, "rb") as csvfile:
        reader = unicodecsv.DictReader(csvfile, fieldnames)
        for row in reader:
            period_handler(row)
            row.pop(None, None)
            row.pop("")
            rows.append(row)
예제 #2
0
def summary_table_write(file, fieldnames, rows):

    with open(file, "w") as csvfile:
        writer = unicodecsv.DictWriter(csvfile, fieldnames)
        writer.writeheader()
        for row in rows:
            period_handler(row)
            writer.writerow(row)