Skip to content

Commit

Permalink
Merge in recent changes on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Nov 24, 2024
2 parents 6a63aed + 3be2cc3 commit 00aa256
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=64.0"]
build-backend = "setuptools.build_meta"
10 changes: 6 additions & 4 deletions taxcalc/taxcalcio.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,16 +546,18 @@ def write_output_file(self, output_dump, dump_varset,
assert 'RECID' in column_order, 'RECID not in dump output list'
column_order.remove('RECID')
column_order.insert(0, 'RECID')
weight_vname = 's006'
else:
outdf = self.minimal_output()
column_order = outdf.columns
weight_vname = 'WEIGHT'
assert len(outdf.index) == self.calc.array_len
if self.tmd_input_data: # pragma: no cover
if "s006" in outdf:
weights = outdf["s006"].round(5)
if weight_vname in outdf:
weights = outdf[weight_vname].round(5)
outdf = outdf.round(2)
if "s006" in outdf:
outdf["s006"] = weights
if weight_vname in outdf:
outdf[weight_vname] = weights
outdf.to_csv(self._output_filename, columns=column_order,
index=False)
else:
Expand Down

0 comments on commit 00aa256

Please sign in to comment.