Skip to content

Commit

Permalink
Merge pull request PSLmodels#252 from PSLmodels/unique-RECID-values
Browse files Browse the repository at this point in the history
Ensure RECID values are unique
  • Loading branch information
martinholmer authored Oct 24, 2024
2 parents 903a89b + c31f6ad commit f1dbf38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ tmd/storage/output/tmd_weights.csv.gz: \
tmd/storage/output/cached_files: \
tmd/storage/output/tmd.csv.gz \
tmd/storage/output/tmd_growfactors.csv \
tmd/storage/output/tmd_weights.csv.gz
tmd/storage/output/tmd_weights.csv.gz \
tmd/storage/__init__.py \
tmd/create_taxcalc_cached_files.py
python tmd/create_taxcalc_cached_files.py

.PHONY=tmd_files
Expand Down
3 changes: 3 additions & 0 deletions tmd/datasets/tmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def create_tmd_2021():
print("Combining PUF and CPS nonfilers...")
combined = pd.concat([tc_puf_21, tc_cps_21], ignore_index=True)

# ensure RECID values are unique
combined["RECID"] = np.arange(1, len(combined) + 1, dtype=int)

trace1("A", combined)

print("Adding Tax-Calculator outputs for 2021...")
Expand Down

0 comments on commit f1dbf38

Please sign in to comment.