Skip to content

Commit b39c26f

Browse files
committed
Add support for new year.csv format
1 parent 33740d1 commit b39c26f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

update_highway_project_years.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'''
33
update_highway_project_years.py
44
Author: npeterson
5-
Revised: 5/9/18
5+
Revised: 6/26/19
66
---------------------------------------------------------------------------
77
This script updates the completion years of projects to be included in
88
Conformity analyses. The final completion year file is received from the
@@ -92,7 +92,7 @@
9292
duplicates = []
9393
with open(tipid_all_csv, 'r') as r:
9494
for line in r:
95-
tipid_str, completion_year_str = line.strip().split(',')
95+
tipid_str, completion_year_str = line.strip().split(',')[:2] # rows from year.csv have a 3rd column that is ignored here
9696
tipid = int(tipid_str)
9797
completion_year = int(completion_year_str)
9898
if tipid in proj_years and completion_year != proj_years[tipid]:

0 commit comments

Comments
 (0)