matching 89% complete

This commit is contained in:
Khalim Conn-Kowlessar 2024-01-22 17:46:20 +00:00
parent 48ec641675
commit 90a47d765b

View file

@ -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)]