mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixed matching for ha28
This commit is contained in:
parent
cb39590f61
commit
0909b811ee
1 changed files with 22 additions and 1 deletions
|
|
@ -887,6 +887,27 @@ class DataLoader:
|
|||
def correct_ha28_survey_list(survey_list):
|
||||
# Rename the "No" column to "No." to align with the other survey sheets
|
||||
survey_list = survey_list.rename(columns={"NO ": "NO."})
|
||||
|
||||
survey_list["Post Code"] = np.where(
|
||||
survey_list["Post Code"] == "ME75HA",
|
||||
"ME7 5HA",
|
||||
survey_list["Post Code"]
|
||||
)
|
||||
|
||||
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||
"ANDREW MANOR/BRITTON ST", "ANDREW MANOR"
|
||||
)
|
||||
|
||||
survey_list["Post Code"] = np.where(
|
||||
survey_list["Post Code"] == "ME75TW",
|
||||
"ME7 5TW",
|
||||
survey_list["Post Code"]
|
||||
)
|
||||
|
||||
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||
"ST MARKS HOUSE/SAXON ST", "ST MARKS HOUSE"
|
||||
)
|
||||
|
||||
return survey_list
|
||||
|
||||
@staticmethod
|
||||
|
|
@ -1046,7 +1067,7 @@ class DataLoader:
|
|||
asset_list["matching_address"].str.contains(row["Street / Block Name"].lower().strip())
|
||||
].copy()
|
||||
|
||||
if str(house_number) not in df["matching_address"].values:
|
||||
if not any(df["matching_address"].str.contains(str(house_number))):
|
||||
if "flat" in str(house_number):
|
||||
house_number = house_number.split("flat")[1].strip()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue