From 46f5ee8ea43e719dc4f0c8c472de68b62d974270 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 1 Mar 2024 22:34:02 +0000 Subject: [PATCH] formatting percentage --- etl/eligibility/ha_15_32/ha_analysis_batch_3.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 0daf239b..b5c6835b 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -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}])