From 21117f3e585be18d5da6e49744353f7ed830a483 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 8 Mar 2024 19:32:42 +0000 Subject: [PATCH] worked through ha13 matching - need to do facts and figures --- .../ha_15_32/ha_analysis_batch_3.py | 28 +++++++++++++++++++ 1 file changed, 28 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 3edc1490..15a4f438 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -174,6 +174,7 @@ class DataLoader: "HA2": 0, "HA6": 117, "HA12": 6, + "HA13": 119, "HA14": 3, "HA15": 3, "HA16": 7, @@ -1621,6 +1622,30 @@ class DataLoader: "ALLANDALE ROAD", "ALLANDALE" ) + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "NEWFIELDS LANE", "NEWFIELD LANE" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "BROADFIELDS ROAD", "BROADFIELD ROAD" + ) + + survey_list["Post Code"] = survey_list["Post Code"].str.replace( + "HP2 5SF+", "HP2 5SF" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "PESCOTT HILL", "PESCOT HILL" + ) + + # This is a duplicate record + survey_list = survey_list[ + ~((survey_list["NO."] == 33) & + (survey_list["Street / Block Name"] == "Turners Hill") & + (survey_list["Post Code"] == "HP2 4LH") & + (survey_list["INSTALLED OR CANCELLED"] == "NO UPDATE - CHECKED 18.12.23")) + ] + return survey_list @staticmethod @@ -1652,6 +1677,9 @@ class DataLoader: postcode.lower() not in asset_list["matching_postcode"].values ] + if ha_name == "HA13": + missed_postcodes = ["hp17 8le"] + matching_lookup = [] for _, row in tqdm(survey_list.iterrows(), total=len(survey_list)):