almost completed the mds output

This commit is contained in:
Khalim Conn-Kowlessar 2024-10-02 17:31:58 +01:00
parent ad82b15c6e
commit 17f653340b

View file

@ -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