Project

General

Profile

« Previous | Next » 

Revision 725

join: For input mappings with no match in the join map, include them in the output map with an empty mapping

View differences:

join
28 28
    cols[1] = map_1_out
29 29
    writer.writerow(cols)
30 30
    for row in reader:
31
        try: row[1] = map_1[row[1]]
32
        except KeyError: continue # skip row
31
        row[1] = map_1.get(row[1], '')
33 32
        writer.writerow(row)
34 33

  
35 34
main()

Also available in: Unified diff