mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
merging on epc data
This commit is contained in:
parent
d69baa21da
commit
d1dc536ab0
2 changed files with 1 additions and 8 deletions
|
|
@ -751,7 +751,7 @@ class AssetList:
|
|||
# We produce some additional fields
|
||||
# 1) Is the SAP rating below C75
|
||||
self.standardised_asset_list[self.ATTRIBUTE_SAP_THRESHOLD_AND_BELOW] = (
|
||||
self.standardised_asset_list[self.EPC_API_DATA_NAMES["current-energy-efficiency"]] <=
|
||||
self.standardised_asset_list[self.EPC_API_DATA_NAMES["current-energy-efficiency"]].astype(float) <=
|
||||
self.FILLED_CAVITY_SAP_THRESHOLD
|
||||
)
|
||||
# 2) Flag anything where the EPC is older than 5 years
|
||||
|
|
|
|||
|
|
@ -376,8 +376,6 @@ def app():
|
|||
epc_data.append(csv_data)
|
||||
|
||||
epc_df = pd.concat(epc_data)
|
||||
# TODO: TEMP!!!
|
||||
epc_df = epc_df.rename(columns={"row_id": asset_list.DOMNA_PROPERTY_ID})
|
||||
|
||||
# We expand out the recommendations
|
||||
recommendations_df = epc_df[[asset_list.DOMNA_PROPERTY_ID, "recommendations"]]
|
||||
|
|
@ -445,11 +443,6 @@ def app():
|
|||
)
|
||||
|
||||
asset_list.merge_data(epc_df)
|
||||
# TODO: TEMP!!!
|
||||
epc_df["epc_os_uprn"] = epc_df["epc_os_uprn"].astype("Int64").astype(str)
|
||||
asset_list.standardised_asset_list = asset_list.standardised_asset_list.merge(
|
||||
epc_df.drop(columns=["domna_property_id"]), how="left", left_on="ordnance_survey_uprn", right_on="epc_os_uprn"
|
||||
)
|
||||
|
||||
asset_list.extract_attributes()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue