From ef77db10373c653e28c82265460ce9fd3bf3f3bf Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 7 Mar 2024 10:56:27 +0000 Subject: [PATCH] HA25 eco3 matching 91% complete --- etl/eligibility/ha_15_32/ha_analysis_batch_3.py | 9 +++++++++ 1 file changed, 9 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 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)