mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
collating results
This commit is contained in:
parent
2ba37d55e6
commit
57a7edf625
1 changed files with 19 additions and 3 deletions
|
|
@ -3035,9 +3035,21 @@ def forecast_remaining_sales(loader):
|
|||
|
||||
results = pd.DataFrame(results)
|
||||
|
||||
# TODO: Add a blank row and then a total row
|
||||
totals_row = {}
|
||||
for col in results.columns:
|
||||
if col == ('', '', '', 'HA Name'):
|
||||
totals_row[col] = "Total"
|
||||
elif col == ("ECO4 post-ciga", "", "Delta vs original estimate", ""):
|
||||
totals_row[col] = results[col].mean()
|
||||
else:
|
||||
totals_row[col] = results[col].sum()
|
||||
|
||||
blank_row = pd.DataFrame([{col: "" for col in results.columns}])
|
||||
|
||||
assumptions = [
|
||||
{
|
||||
("", "", "", "HA Name"): "Assumptions",
|
||||
},
|
||||
{
|
||||
("", "", "", "HA Name"): "ECO4 rate",
|
||||
("", "Original Warmfront estimate", "Total - #", "ECO4 - November"): "£" + str(eco4_rate)
|
||||
|
|
@ -3059,16 +3071,20 @@ def forecast_remaining_sales(loader):
|
|||
("", "", "", "HA Name"): "Median ECO4 (no CIGA) sales conversion rate",
|
||||
("ECO4 original", "", "Total - £", ""): str(round(median_eco4_to_install * 100, 1)) + "%",
|
||||
("ECO4 original", "", "Remaining - £",
|
||||
""): " - Sales conversion rate for a ECO4 property that didn't need a CIGA check"
|
||||
""): " - Sales conversion rate for a ECO4 property that didn't need a CIGA check. Job must not cancel"
|
||||
},
|
||||
{
|
||||
("", "", "", "HA Name"): "Median ECO4 (subect to CIGA) sales conversion rate",
|
||||
("ECO4 original", "", "Total - £", ""): str(round(median_ciga_pass_to_install * 100, 1)) + "%",
|
||||
("ECO4 original", "", "Remaining - £",
|
||||
""): " - Sales conversion rate for a ECO4 property that passed a CIGA check"
|
||||
""): " - Sales conversion rate for a ECO4 property that passed a CIGA check. Job must not cancel"
|
||||
}
|
||||
]
|
||||
|
||||
results = pd.concat(
|
||||
[results, pd.DataFrame([totals_row]), blank_row, blank_row, pd.DataFrame(assumptions)]
|
||||
)
|
||||
|
||||
|
||||
def app():
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue