diff --git a/asset_list/AssetList.py b/asset_list/AssetList.py index 14dce093..5e8ff29c 100644 --- a/asset_list/AssetList.py +++ b/asset_list/AssetList.py @@ -297,6 +297,12 @@ class AssetList: self.rename_map = {} self.keep_variables = [] + # Finally, we handle the case where the landlord's property ID is actually the OS UPRN + if self.landlord_uprn == self.landlord_property_id: + self.raw_asset_list[self.STANDARD_UPRN] = self.raw_asset_list[self.landlord_uprn].copy() + # Update the reference to landlord UPRn + self.landlord_uprn = self.STANDARD_UPRN + def _extract_address1(self, asset_list, full_address_col, postcode_col, method="first_two_words"): if method not in self.ADDRESS_1_CLEANING_METHODS: diff --git a/etl/route_march_data_pull/app.py b/etl/route_march_data_pull/app.py index 83e5e0ca..4bf9fe3a 100644 --- a/etl/route_march_data_pull/app.py +++ b/etl/route_march_data_pull/app.py @@ -511,6 +511,7 @@ def app(): find_my_epc_data["Solar photovoltaics"] = False # Retrieve just the data we need + epc_df = epc_df[ [ "row_id", @@ -527,21 +528,23 @@ def app(): "walls-description", "floor-description", "transaction-type", - # New fields needed "secondheat-description", "total-floor-area", "construction-age-band", "floor-height", "number-habitable-rooms", "mainheat-description", - # - "energy-consumption-current", # kwh/m2 + 'mainheatcont-description', + "energy-consumption-current", "photo-supply", ] ].rename( columns={"address1": "Address1 on EPC", "address": "Address on EPC", "postcode": "Postcode on EPC"} ) + asset_list.merge_data(epc_df) + asset_list.insert_ + asset_list = asset_list.merge( epc_df, how="left",