7979]
8080
8181CANONICAL_CTC_REFORM_DICT = {
82- "gov.irs.credits.eitc.max[0].amount" : {
83- "2025-01-01.2100-12-31" : 2_000
84- },
85- "gov.irs.credits.eitc.max[1].amount" : {
86- "2025-01-01.2100-12-31" : 2_000
87- },
88- "gov.irs.credits.eitc.max[2].amount" : {
89- "2025-01-01.2100-12-31" : 2_000
90- },
91- "gov.irs.credits.eitc.max[3].amount" : {
92- "2025-01-01.2100-12-31" : 2_000
93- },
94- "gov.irs.credits.ctc.phase_out.amount" : {
95- "2025-01-01.2100-12-31" : 25
96- },
97- "gov.irs.credits.ctc.amount.arpa[0].amount" : {
98- "2025-01-01.2100-12-31" : 4_800
99- },
100- "gov.irs.credits.ctc.amount.arpa[1].amount" : {
101- "2025-01-01.2100-12-31" : 4_800
102- },
103- "gov.irs.credits.ctc.phase_out.arpa.amount" : {
104- "2025-01-01.2100-12-31" : 25
105- },
106- "gov.contrib.ctc.minimum_refundable.in_effect" : {
107- "2025-01-01.2100-12-31" : True
108- },
109- "gov.contrib.ctc.per_child_phase_in.in_effect" : {
110- "2025-01-01.2100-12-31" : True
111- },
112- "gov.irs.credits.ctc.phase_out.arpa.in_effect" : {
113- "2025-01-01.2100-12-31" : True
114- },
115- "gov.irs.credits.ctc.refundable.phase_in.rate" : {
116- "2025-01-01.2100-12-31" : 0.2
117- },
118- "gov.irs.credits.eitc.phase_in_rate[0].amount" : {
119- "2025-01-01.2100-12-31" : 0.2
120- },
121- "gov.irs.credits.eitc.phase_in_rate[1].amount" : {
122- "2025-01-01.2100-12-31" : 0.2
123- },
124- "gov.irs.credits.eitc.phase_in_rate[2].amount" : {
125- "2025-01-01.2100-12-31" : 0.2
126- },
127- "gov.irs.credits.eitc.phase_in_rate[3].amount" : {
128- "2025-01-01.2100-12-31" : 0.2
129- },
130- "gov.contrib.ctc.per_child_phase_out.in_effect" : {
131- "2025-01-01.2100-12-31" : True
132- },
133- "gov.irs.credits.ctc.phase_out.threshold.JOINT" : {
134- "2025-01-01.2100-12-31" : 200_000
135- },
136- "gov.irs.credits.ctc.refundable.individual_max" : {
137- "2025-01-01.2100-12-31" : 4_800
138- },
139- "gov.irs.credits.eitc.phase_out.rate[0].amount" : {
140- "2025-01-01.2100-12-31" : 0.1
141- },
142- "gov.irs.credits.eitc.phase_out.rate[1].amount" : {
143- "2025-01-01.2100-12-31" : 0.1
144- },
145- "gov.irs.credits.eitc.phase_out.rate[2].amount" : {
146- "2025-01-01.2100-12-31" : 0.1
147- },
148- "gov.irs.credits.eitc.phase_out.rate[3].amount" : {
149- "2025-01-01.2100-12-31" : 0.1
150- },
82+ "gov.irs.credits.eitc.max[0].amount" : {"2025-01-01.2100-12-31" : 2_000 },
83+ "gov.irs.credits.eitc.max[1].amount" : {"2025-01-01.2100-12-31" : 2_000 },
84+ "gov.irs.credits.eitc.max[2].amount" : {"2025-01-01.2100-12-31" : 2_000 },
85+ "gov.irs.credits.eitc.max[3].amount" : {"2025-01-01.2100-12-31" : 2_000 },
86+ "gov.irs.credits.ctc.phase_out.amount" : {"2025-01-01.2100-12-31" : 25 },
87+ "gov.irs.credits.ctc.amount.arpa[0].amount" : {"2025-01-01.2100-12-31" : 4_800 },
88+ "gov.irs.credits.ctc.amount.arpa[1].amount" : {"2025-01-01.2100-12-31" : 4_800 },
89+ "gov.irs.credits.ctc.phase_out.arpa.amount" : {"2025-01-01.2100-12-31" : 25 },
90+ "gov.contrib.ctc.minimum_refundable.in_effect" : {"2025-01-01.2100-12-31" : True },
91+ "gov.contrib.ctc.per_child_phase_in.in_effect" : {"2025-01-01.2100-12-31" : True },
92+ "gov.irs.credits.ctc.phase_out.arpa.in_effect" : {"2025-01-01.2100-12-31" : True },
93+ "gov.irs.credits.ctc.refundable.phase_in.rate" : {"2025-01-01.2100-12-31" : 0.2 },
94+ "gov.irs.credits.eitc.phase_in_rate[0].amount" : {"2025-01-01.2100-12-31" : 0.2 },
95+ "gov.irs.credits.eitc.phase_in_rate[1].amount" : {"2025-01-01.2100-12-31" : 0.2 },
96+ "gov.irs.credits.eitc.phase_in_rate[2].amount" : {"2025-01-01.2100-12-31" : 0.2 },
97+ "gov.irs.credits.eitc.phase_in_rate[3].amount" : {"2025-01-01.2100-12-31" : 0.2 },
98+ "gov.contrib.ctc.per_child_phase_out.in_effect" : {"2025-01-01.2100-12-31" : True },
99+ "gov.irs.credits.ctc.phase_out.threshold.JOINT" : {"2025-01-01.2100-12-31" : 200_000 },
100+ "gov.irs.credits.ctc.refundable.individual_max" : {"2025-01-01.2100-12-31" : 4_800 },
101+ "gov.irs.credits.eitc.phase_out.rate[0].amount" : {"2025-01-01.2100-12-31" : 0.1 },
102+ "gov.irs.credits.eitc.phase_out.rate[1].amount" : {"2025-01-01.2100-12-31" : 0.1 },
103+ "gov.irs.credits.eitc.phase_out.rate[2].amount" : {"2025-01-01.2100-12-31" : 0.1 },
104+ "gov.irs.credits.eitc.phase_out.rate[3].amount" : {"2025-01-01.2100-12-31" : 0.1 },
151105 "gov.irs.credits.ctc.phase_out.threshold.SINGLE" : {
152106 "2025-01-01.2100-12-31" : 100_000
153107 },
154- "gov.irs.credits.eitc.phase_out.start[0].amount" : {
155- "2025-01-01.2100-12-31" : 20_000
156- },
157- "gov.irs.credits.eitc.phase_out.start[1].amount" : {
158- "2025-01-01.2100-12-31" : 20_000
159- },
160- "gov.irs.credits.eitc.phase_out.start[2].amount" : {
161- "2025-01-01.2100-12-31" : 20_000
162- },
163- "gov.irs.credits.eitc.phase_out.start[3].amount" : {
164- "2025-01-01.2100-12-31" : 20_000
165- },
108+ "gov.irs.credits.eitc.phase_out.start[0].amount" : {"2025-01-01.2100-12-31" : 20_000 },
109+ "gov.irs.credits.eitc.phase_out.start[1].amount" : {"2025-01-01.2100-12-31" : 20_000 },
110+ "gov.irs.credits.eitc.phase_out.start[2].amount" : {"2025-01-01.2100-12-31" : 20_000 },
111+ "gov.irs.credits.eitc.phase_out.start[3].amount" : {"2025-01-01.2100-12-31" : 20_000 },
166112 "gov.irs.credits.ctc.phase_out.threshold.SEPARATE" : {
167113 "2025-01-01.2100-12-31" : 100_000
168114 },
169115 "gov.contrib.ctc.per_child_phase_out.avoid_overlap" : {
170116 "2025-01-01.2100-12-31" : True
171117 },
172- "gov.irs.credits.ctc.refundable.phase_in.threshold" : {
173- "2025-01-01.2100-12-31" : 0
174- },
118+ "gov.irs.credits.ctc.refundable.phase_in.threshold" : {"2025-01-01.2100-12-31" : 0 },
175119 "gov.irs.credits.ctc.phase_out.arpa.threshold.JOINT" : {
176120 "2025-01-01.2100-12-31" : 35_000
177121 },
@@ -273,9 +217,7 @@ def build_canonical_ctc_reform_summary(
273217def _format_canonical_ctc_reform_summary (table : pd .DataFrame ) -> str :
274218 display = table .copy ()
275219 for column in ("baseline" , "reformed" , "delta" ):
276- display [column ] = display [column ].map (
277- lambda value : f"${ value / 1e9 :,.1f} B"
278- )
220+ display [column ] = display [column ].map (lambda value : f"${ value / 1e9 :,.1f} B" )
279221 return display .to_string (index = False )
280222
281223
@@ -296,7 +238,9 @@ def _subtract_diagnostic_tables(
296238 and pd .api .types .is_numeric_dtype (reformed [column ])
297239 ]
298240 id_columns = [
299- column for column in baseline .columns if column in reformed .columns and column not in numeric_columns
241+ column
242+ for column in baseline .columns
243+ if column in reformed .columns and column not in numeric_columns
300244 ]
301245 merged = baseline .merge (
302246 reformed ,
@@ -305,9 +249,7 @@ def _subtract_diagnostic_tables(
305249 )
306250 delta = merged [id_columns ].copy ()
307251 for column in numeric_columns :
308- delta [column ] = (
309- merged [f"{ column } _reformed" ] - merged [f"{ column } _baseline" ]
310- )
252+ delta [column ] = merged [f"{ column } _reformed" ] - merged [f"{ column } _baseline" ]
311253 delta_tables [name ] = delta
312254 return delta_tables
313255
0 commit comments