From e7cd80eba0ef8f11c62506509b5a7d60c7a37ce7 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 18 Mar 2024 12:34:28 +0000 Subject: [PATCH] Added HA52 --- .../ha_15_32/ha_analysis_batch_3.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index af9af514..056a4190 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -946,6 +946,17 @@ class DataLoader: else: return "ECO surveys" + @staticmethod + def correct_ha51_asset_list(asset_list): + # Correct this + asset_list["HouseNo"] = np.where( + asset_list["matching_address"].str.contains("61 wandle bank"), + asset_list["Block"].str.lower(), + asset_list["HouseNo"] + ) + + return asset_list + def load_asset_list(self, filepath, ha_name): workbook = openpyxl.load_workbook(filepath) asset_sheetname = self.get_asset_sheetname(workbook) @@ -2510,6 +2521,16 @@ class DataLoader: ) return survey_list + @staticmethod + def correct_ha51_survey_list(survey_list): + survey_list = survey_list.rename(columns={"NO ": "NO."}) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Autum Close", "Autumn Close" + ) + + return survey_list + @staticmethod def levenstein_match(matching_string, df): match_to = df["matching_address"].tolist()