We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 030f761 commit e00b95bCopy full SHA for e00b95b
1 file changed
policyengine_us_data/calibration/unified_matrix_builder.py
@@ -1695,10 +1695,11 @@ def _load_aca_ptc_factors(
1695
if suffix.isdigit():
1696
csv_candidates[int(suffix)] = path
1697
1698
- eligible_years = [
1699
- year for year in csv_candidates if year <= self.time_period
1700
- ] or sorted(csv_candidates)
1701
- csv_path = csv_candidates[max(eligible_years)]
+ eligible_years = [year for year in csv_candidates if year <= self.time_period]
+ if eligible_years:
+ csv_path = csv_candidates[max(eligible_years)]
+ else:
1702
+ csv_path = csv_candidates[min(csv_candidates)]
1703
df = pd.read_csv(csv_path)
1704
result = {}
1705
for _, row in df.iterrows():
0 commit comments