Added HA52

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-18 12:34:28 +00:00
parent c58acadb73
commit e7cd80eba0

View file

@ -946,6 +946,17 @@ class DataLoader:
else:
return "ECO surveys"
@staticmethod
def correct_ha51_asset_list(asset_list):
# Correct this
asset_list["HouseNo"] = np.where(
asset_list["matching_address"].str.contains("61 wandle bank"),
asset_list["Block"].str.lower(),
asset_list["HouseNo"]
)
return asset_list
def load_asset_list(self, filepath, ha_name):
workbook = openpyxl.load_workbook(filepath)
asset_sheetname = self.get_asset_sheetname(workbook)
@ -2510,6 +2521,16 @@ class DataLoader:
)
return survey_list
@staticmethod
def correct_ha51_survey_list(survey_list):
survey_list = survey_list.rename(columns={"NO ": "NO."})
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
"Autum Close", "Autumn Close"
)
return survey_list
@staticmethod
def levenstein_match(matching_string, df):
match_to = df["matching_address"].tolist()