|
118 | 118 | }, |
119 | 119 | { |
120 | 120 | "cell_type": "code", |
121 | | - "execution_count": 4, |
| 121 | + "execution_count": null, |
122 | 122 | "metadata": { |
123 | 123 | "execution": { |
124 | 124 | "iopub.execute_input": "2025-09-15T18:56:58.431738Z", |
|
127 | 127 | "shell.execute_reply": "2025-09-15T18:56:58.440461Z" |
128 | 128 | } |
129 | 129 | }, |
130 | | - "outputs": [ |
131 | | - { |
132 | | - "name": "stdout", |
133 | | - "output_type": "stream", |
134 | | - "text": [ |
135 | | - "\n", |
136 | | - "=== REBATE BASE CALCULATIONS (2026) ===\n" |
137 | | - ] |
138 | | - }, |
139 | | - { |
140 | | - "data": { |
141 | | - "text/html": [ |
142 | | - "<div>\n", |
143 | | - "<style scoped>\n", |
144 | | - " .dataframe tbody tr th:only-of-type {\n", |
145 | | - " vertical-align: middle;\n", |
146 | | - " }\n", |
147 | | - "\n", |
148 | | - " .dataframe tbody tr th {\n", |
149 | | - " vertical-align: top;\n", |
150 | | - " }\n", |
151 | | - "\n", |
152 | | - " .dataframe thead th {\n", |
153 | | - " text-align: right;\n", |
154 | | - " }\n", |
155 | | - "</style>\n", |
156 | | - "<table border=\"1\" class=\"dataframe\">\n", |
157 | | - " <thead>\n", |
158 | | - " <tr style=\"text-align: right;\">\n", |
159 | | - " <th></th>\n", |
160 | | - " <th>Unit Type</th>\n", |
161 | | - " <th>Total CA Units</th>\n", |
162 | | - " <th>Units with Rebate</th>\n", |
163 | | - " <th>Average Rebate Base</th>\n", |
164 | | - " <th>Total Rebate Base</th>\n", |
165 | | - " <th>Tax Units per Household</th>\n", |
166 | | - " </tr>\n", |
167 | | - " </thead>\n", |
168 | | - " <tbody>\n", |
169 | | - " <tr>\n", |
170 | | - " <th>0</th>\n", |
171 | | - " <td>household</td>\n", |
172 | | - " <td>14.6M</td>\n", |
173 | | - " <td>3.2M (22%)</td>\n", |
174 | | - " <td>$20,245</td>\n", |
175 | | - " <td>$65.3B</td>\n", |
176 | | - " <td>1.50</td>\n", |
177 | | - " </tr>\n", |
178 | | - " <tr>\n", |
179 | | - " <th>1</th>\n", |
180 | | - " <td>tax_unit</td>\n", |
181 | | - " <td>21.9M</td>\n", |
182 | | - " <td>8.7M (40%)</td>\n", |
183 | | - " <td>$18,146</td>\n", |
184 | | - " <td>$158.4B</td>\n", |
185 | | - " <td>1.50</td>\n", |
186 | | - " </tr>\n", |
187 | | - " </tbody>\n", |
188 | | - "</table>\n", |
189 | | - "</div>" |
190 | | - ], |
191 | | - "text/plain": [ |
192 | | - " Unit Type Total CA Units Units with Rebate Average Rebate Base \\\n", |
193 | | - "0 household 14.6M 3.2M (22%) $20,245 \n", |
194 | | - "1 tax_unit 21.9M 8.7M (40%) $18,146 \n", |
195 | | - "\n", |
196 | | - " Total Rebate Base Tax Units per Household \n", |
197 | | - "0 $65.3B 1.50 \n", |
198 | | - "1 $158.4B 1.50 " |
199 | | - ] |
200 | | - }, |
201 | | - "execution_count": 4, |
202 | | - "metadata": {}, |
203 | | - "output_type": "execute_result" |
204 | | - } |
205 | | - ], |
206 | | - "source": [ |
207 | | - "# Stack results into a single DataFrame for easy comparison\n", |
208 | | - "results_df = pd.DataFrame([household_results, tax_unit_results])\n", |
209 | | - "\n", |
210 | | - "# Format numeric columns for display\n", |
211 | | - "display_df = results_df.copy()\n", |
212 | | - "display_df['Total CA Units'] = display_df['total_ca_units'].apply(lambda x: f\"{x/1e6:.1f}M\")\n", |
213 | | - "display_df['Units with Rebate'] = display_df.apply(lambda r: f\"{r['units_with_rebate']/1e6:.1f}M ({r['rebate_percentage']:.0%})\", axis=1)\n", |
214 | | - "display_df['Average Rebate Base'] = display_df['average_rebate_base'].apply(lambda x: f\"${x:,.0f}\")\n", |
215 | | - "display_df['Total Rebate Base'] = display_df['total_rebate_base'].apply(lambda x: f\"${x/1e9:.1f}B\")\n", |
216 | | - "\n", |
217 | | - "# Add a simple ratio column\n", |
218 | | - "display_df['Ratio'] = f\"{tax_unit_results['total_ca_units']/household_results['total_ca_units']:.2f}\"\n", |
219 | | - "\n", |
220 | | - "# Select columns for display\n", |
221 | | - "display_cols = ['unit_type', 'Total CA Units', 'Units with Rebate', 'Average Rebate Base', 'Total Rebate Base', 'Ratio']\n", |
222 | | - "display_df = display_df[display_cols]\n", |
223 | | - "display_df.columns = ['Unit Type', 'Total CA Units', 'Units with Rebate', 'Average Rebate Base', 'Total Rebate Base', 'Tax Units per Household']\n", |
224 | | - "\n", |
225 | | - "print(f\"\\n=== REBATE BASE CALCULATIONS ({SIMULATION_YEAR}) ===\")\n", |
226 | | - "display_df" |
227 | | - ] |
| 130 | + "outputs": [], |
| 131 | + "source": "# Stack results into a single DataFrame for easy comparison\nresults_df = pd.DataFrame([household_results, tax_unit_results])\n\n# Format numeric columns for display\ndisplay_df = results_df.copy()\ndisplay_df['Total CA Units'] = display_df['total_ca_units'].apply(lambda x: f\"{x/1e6:.1f}M\")\ndisplay_df['Units with Rebate'] = display_df.apply(lambda r: f\"{r['units_with_rebate']/1e6:.1f}M ({r['rebate_percentage']:.0%})\", axis=1)\ndisplay_df['Average Rebate Base'] = display_df['average_rebate_base'].apply(lambda x: f\"${x:,.0f}\")\ndisplay_df['Total Rebate Base'] = display_df['total_rebate_base'].apply(lambda x: f\"${x/1e9:.1f}B\")\n\n# Select columns for display\ndisplay_cols = ['unit_type', 'Total CA Units', 'Units with Rebate', 'Average Rebate Base', 'Total Rebate Base']\ndisplay_df = display_df[display_cols]\ndisplay_df.columns = ['Unit Type', 'Total CA Units', 'Units with Rebate', 'Average Rebate Base', 'Total Rebate Base']\n\nprint(f\"\\n=== REBATE BASE CALCULATIONS ({SIMULATION_YEAR}) ===\")\ndisplay_df" |
228 | 132 | }, |
229 | 133 | { |
230 | 134 | "cell_type": "code", |
|
0 commit comments