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