formatting percentage

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-01 22:34:02 +00:00
parent fbd808a54d
commit 46f5ee8ea4

View file

@ -3059,20 +3059,18 @@ def forecast_remaining_sales(loader):
totals_row[col] = results[col].sum()
# For the delta columns, we calculate the delta on the totals
totals_row[("ECO4 post-ciga", "", "Delta vs original estimate - %", "")] = round(
100 * (
totals_row[("ECO4 post-ciga", "", "Delta vs original estimate - %", "")] = (
(
totals_row[("ECO4 post-ciga", "", "Estimated total eligible - #", "ECO4 total (post-ciga)")] -
totals_row[("", "Original Warmfront estimate", "Total - #", "ECO4 - November")]
) / totals_row[("", "Original Warmfront estimate", "Total - #", "ECO4 - November")],
1
) / totals_row[("", "Original Warmfront estimate", "Total - #", "ECO4 - November")]
)
totals_row[("GBIS Postcode list", "", "Delta vs original estimate - %", "")] = round(
100 * (
totals_row[("GBIS Postcode list", "", "Delta vs original estimate - %", "")] = (
(
totals_row[("GBIS Postcode list", "Warmfront post code list", "Total - #", "GBIS total")] -
totals_row[("", "Original Warmfront estimate", "Total - #", "GBIS - November")]
) / totals_row[("", "Original Warmfront estimate", "Total - #", "GBIS - November")],
1
) / totals_row[("", "Original Warmfront estimate", "Total - #", "GBIS - November")]
)
blank_row = pd.DataFrame([{col: "" for col in results.columns}])