From bfd0ca216acaf49b83cf0ada15c3bc098b5a71e3 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Tue, 29 Oct 2024 14:49:39 -0700 Subject: [PATCH] Fix active skim columns in travel time reporter --- src/main/python/TravelTimeReporter.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/python/TravelTimeReporter.py b/src/main/python/TravelTimeReporter.py index b9d07ba05..58aa9858b 100644 --- a/src/main/python/TravelTimeReporter.py +++ b/src/main/python/TravelTimeReporter.py @@ -107,14 +107,22 @@ def read_active_skims(self): Reads active skims into memory as data frames """ for skim_name in self.settings["active_skim_files"]: - self.skims[skim_name] = pd.read_csv( - os.path.join( - self.model_run, - "output", - "skims", - self.settings["active_skim_files"][skim_name] + active_skims = pd.read_csv( + os.path.join( + self.model_run, + "output", + "skims", + self.settings["active_skim_files"][skim_name] ) - ).set_index( + ) + if not "i" in active_skims.columns: + active_skims = active_skims.rename( + columns = { + "OMAZ": "i", + "DMAZ": "j", + } + ) + self.skims[skim_name] = active_skims.set_index( ["i", "j"] )