From 66ab7b44b7eebeafc9fb065d2a799ac3c47628f8 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 14 Mar 2026 07:41:48 -0700 Subject: [PATCH] Remove duplicate bad_targets entries in EnhancedCPS reweighting The bad_targets list had 9 duplicate entries (lines 163-171 were exact copies of 154-162). This is harmless since `.isin()` deduplicates, but the duplicates obscure the actual exclusion list. Co-Authored-By: Claude Opus 4.6 --- changelog.d/fix-duplicate-bad-targets.fixed.md | 1 + policyengine_us_data/datasets/cps/enhanced_cps.py | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) create mode 100644 changelog.d/fix-duplicate-bad-targets.fixed.md diff --git a/changelog.d/fix-duplicate-bad-targets.fixed.md b/changelog.d/fix-duplicate-bad-targets.fixed.md new file mode 100644 index 00000000..24b7bd56 --- /dev/null +++ b/changelog.d/fix-duplicate-bad-targets.fixed.md @@ -0,0 +1 @@ +Remove duplicate entries in bad_targets list. diff --git a/policyengine_us_data/datasets/cps/enhanced_cps.py b/policyengine_us_data/datasets/cps/enhanced_cps.py index 8755c73e..a6abc8aa 100644 --- a/policyengine_us_data/datasets/cps/enhanced_cps.py +++ b/policyengine_us_data/datasets/cps/enhanced_cps.py @@ -151,15 +151,6 @@ def generate(self): ) bad_targets = [ - "nation/irs/adjusted gross income/total/AGI in 10k-15k/taxable/Head of Household", - "nation/irs/adjusted gross income/total/AGI in 15k-20k/taxable/Head of Household", - "nation/irs/adjusted gross income/total/AGI in 10k-15k/taxable/Married Filing Jointly/Surviving Spouse", - "nation/irs/adjusted gross income/total/AGI in 15k-20k/taxable/Married Filing Jointly/Surviving Spouse", - "nation/irs/count/count/AGI in 10k-15k/taxable/Head of Household", - "nation/irs/count/count/AGI in 15k-20k/taxable/Head of Household", - "nation/irs/count/count/AGI in 10k-15k/taxable/Married Filing Jointly/Surviving Spouse", - "nation/irs/count/count/AGI in 15k-20k/taxable/Married Filing Jointly/Surviving Spouse", - "state/RI/adjusted_gross_income/amount/-inf_1", "nation/irs/adjusted gross income/total/AGI in 10k-15k/taxable/Head of Household", "nation/irs/adjusted gross income/total/AGI in 15k-20k/taxable/Head of Household", "nation/irs/adjusted gross income/total/AGI in 10k-15k/taxable/Married Filing Jointly/Surviving Spouse",