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 3ea9649e..ea5b0456 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -1516,6 +1516,15 @@ class DataLoader: if df.shape[0] != 1: df = df[df["HouseNo"].astype(str).str.lower() == str(house_number)] + if df.empty: + missed.append(row["eco3_list_row_id"]) + continue + + if df.shape[0] != 1: + # Perform a search on streetname + street_name_section1 = row["Street / Block Name"].lower().split("/")[0].split(",")[0] + df = df[df["matching_address"].str.contains(street_name_section1)] + if df.shape[0] != 1: print(row["Street / Block Name"]) print(house_number)