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 61a90d14..05c0299c 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -142,7 +142,6 @@ class DataLoader: # We now do the matching between the asset list and the survey list. # What we'll get from this is a lookup table from the asset list to the survey list - matched_lookup = pd.DataFrame() if ha_name == "ha_6": matched_lookup = self.merge_ha_6(asset_list, survey_list) else: @@ -261,8 +260,9 @@ class DataLoader: "Brittania Avenue", "Brittain Avenue" ) - # Moffat Way - # Moffatt Way + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Hawthorn Road", "Hawthorne Road" + ) matching_lookup = [] for _, row in tqdm(survey_list.iterrows(), total=len(survey_list)): @@ -274,6 +274,7 @@ class DataLoader: df = asset_list[ asset_list["matching_address"].str.contains(row["Street / Block Name"].lower().strip()) ].copy() + df = df[df["matching_address"].str.contains(str(house_number))] if df.shape[0] != 1: df = df[df["HouseNo"] == str(house_number)]