mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
ha38 wip - leaving for now
This commit is contained in:
parent
8e258ff3ca
commit
067a66c1b1
1 changed files with 53 additions and 1 deletions
|
|
@ -599,7 +599,52 @@ class DataLoader:
|
|||
asset_list['ExtractedHouseNo'] = asset_list['matching_address'].apply(extract_house_no_if_flat)
|
||||
asset_list.loc[asset_list['ExtractedHouseNo'].notnull(), 'HouseNo'] = asset_list['ExtractedHouseNo']
|
||||
asset_list['matching_address'] = asset_list['matching_address'].apply(rearrange_address_if_flat)
|
||||
# We then need to
|
||||
|
||||
# We update a few specific rows
|
||||
asset_list["HouseNo"] = np.where(
|
||||
(asset_list["Address_Line_1"].isin(
|
||||
[
|
||||
"10 SOUTH VIEW/ROOM A1",
|
||||
"10 SOUTH VIEW/ROOM A2",
|
||||
"10 SOUTH VIEW/ROOM A3",
|
||||
]
|
||||
)),
|
||||
"10A",
|
||||
asset_list["HouseNo"]
|
||||
)
|
||||
|
||||
asset_list["matching_address"] = np.where(
|
||||
(asset_list["Address_Line_1"].isin(
|
||||
[
|
||||
"10 SOUTH VIEW/ROOM A1",
|
||||
]
|
||||
)),
|
||||
"10a, 10 south view/room a1, spennymoor, co. durham, dl16 7df'",
|
||||
asset_list["matching_address"]
|
||||
)
|
||||
|
||||
asset_list["HouseNo"] = np.where(
|
||||
(asset_list["Address_Line_1"].isin(
|
||||
[
|
||||
"10 SOUTH VIEW/ROOM B1",
|
||||
"10 SOUTH VIEW/ROOM B2",
|
||||
"10 SOUTH VIEW/ROOM B3",
|
||||
"10 SOUTH VIEW/ROOM B4",
|
||||
]
|
||||
)),
|
||||
"10B",
|
||||
asset_list["HouseNo"]
|
||||
)
|
||||
|
||||
asset_list["matching_address"] = np.where(
|
||||
(asset_list["Address_Line_1"].isin(
|
||||
[
|
||||
"10 SOUTH VIEW/ROOM B1",
|
||||
]
|
||||
)),
|
||||
"10b, 10 south view/room b1, spennymoor, co. durham, dl16 7df",
|
||||
asset_list["matching_address"]
|
||||
)
|
||||
|
||||
return asset_list
|
||||
|
||||
|
|
@ -1147,6 +1192,13 @@ class DataLoader:
|
|||
survey_list["Post Code"]
|
||||
)
|
||||
|
||||
survey_list["Street / Block Name"] = np.where(
|
||||
(survey_list["Street / Block Name"] == "SOUTHVIEW") &
|
||||
(survey_list["Post Code"] == "DL16 7DF"),
|
||||
"SOUTH VIEW",
|
||||
survey_list["Street / Block Name"]
|
||||
)
|
||||
|
||||
return survey_list
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue