Skip to content

Commit

Permalink
Convert scenario_year to int before comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavasana authored May 11, 2024
1 parent 15584da commit ecd4d2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asim/scripts/resident/resident_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def pre_process_landuse(self):
def add_external_counts_to_landuse(self):
print("Adding external counts to landuse file.")
ext_data = pd.read_csv(self.ext_data_file)
ext_data = (ext_data.loc[(ext_data['start_year']<=scenario_year)]
ext_data = (ext_data.loc[(ext_data['start_year']<=int(scenario_year))]
.sort_values('start_year', ascending=False)
.drop_duplicates('taz') #keep taz row w/ highest start_year
.sort_values(by='taz')
Expand Down

0 comments on commit ecd4d2d

Please sign in to comment.