From 17f653340bb26a098377c8415496284ccf47d360 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 2 Oct 2024 17:31:58 +0100 Subject: [PATCH] almost completed the mds output --- backend/Outputs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/Outputs.py b/backend/Outputs.py index 4e300e81..aef47b54 100644 --- a/backend/Outputs.py +++ b/backend/Outputs.py @@ -251,9 +251,14 @@ class Outputs: ].sum().reset_index() scenario_mds = mds.merge( + scenario_measure_matrix, how="left", on="property_id" + ).merge( recommendation_impacts, how="left", on="property_id" ) # If we have no recommendations, sap_points, kwh_savings, head_demand will be NaN + to_clean = [c for c in recommendation_impacts.columns if c != "property_id"] + for col in to_clean: + scenario_mds[col].fillna(0, inplace=True) scenario_mds.fillna(0, inplace=True) scenario_mds["Post SAP"] = scenario_mds["EPC Source"] + scenario_mds["sap_points"] # Round Post SAP down to the nearest integer