fixed the bug in matching ha6 assets and surveys

This commit is contained in:
Khalim Conn-Kowlessar 2024-01-23 18:19:29 +00:00
parent 9ac6b25b9f
commit 4b73aa75b2

View file

@ -226,11 +226,18 @@ class DataLoader:
@staticmethod
def merge_ha_6(asset_list, survey_list):
# Correct the asset list
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("baggott place", "baggotts place")
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("cherry tree", "cherrytree")
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("maryhill close", "mary hill close")
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("moffat way", "moffatt way")
# Correct the asset list across propertyaddress and matching_address
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("Baggott Place", "Baggotts Place")
asset_list["matching_address"] = asset_list["matching_address"].str.replace("baggott place", "baggotts place")
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("Cherry Tree", "Cherrytree")
asset_list["matching_address"] = asset_list["matching_address"].str.replace("cherry tree", "cherrytree")
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("Maryhill Close", "Mary Hill Close")
asset_list["matching_address"] = asset_list["matching_address"].str.replace("maryhill close", "mary hill close")
asset_list["propertyaddress"] = asset_list["propertyaddress"].str.replace("Moffat Way", "Moffatt Way")
asset_list["matching_address"] = asset_list["matching_address"].str.replace("moffat way", "moffatt way")
# Correct the survey list
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(