mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
fixed logic for missed postcodes for ha6
This commit is contained in:
parent
bc0a2b8e37
commit
5a451f2f82
1 changed files with 11 additions and 10 deletions
|
|
@ -518,6 +518,17 @@ class DataLoader:
|
||||||
df = df[df["matching_address"].str.contains(str(house_number))]
|
df = df[df["matching_address"].str.contains(str(house_number))]
|
||||||
|
|
||||||
if df.empty:
|
if df.empty:
|
||||||
|
|
||||||
|
postcode_lower = row["Post Code"].lower()
|
||||||
|
if postcode_lower in missed_postcodes:
|
||||||
|
matching_lookup.append(
|
||||||
|
{
|
||||||
|
"survey_list_row_id": row["survey_list_row_id"],
|
||||||
|
"asset_list_row_id": None,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
print(row["Street / Block Name"])
|
print(row["Street / Block Name"])
|
||||||
print(house_number)
|
print(house_number)
|
||||||
print(row["Post Code"])
|
print(row["Post Code"])
|
||||||
|
|
@ -546,16 +557,6 @@ class DataLoader:
|
||||||
df = df.iloc[best_match_index:best_match_index + 1]
|
df = df.iloc[best_match_index:best_match_index + 1]
|
||||||
|
|
||||||
if df.shape[0] != 1:
|
if df.shape[0] != 1:
|
||||||
postcode_lower = row["Post Code"].lower()
|
|
||||||
if postcode_lower in missed_postcodes:
|
|
||||||
matching_lookup.append(
|
|
||||||
{
|
|
||||||
"survey_list_row_id": row["survey_list_row_id"],
|
|
||||||
"asset_list_row_id": None,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
|
|
||||||
print(row["Street / Block Name"])
|
print(row["Street / Block Name"])
|
||||||
print(house_number)
|
print(house_number)
|
||||||
print(row["Post Code"])
|
print(row["Post Code"])
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue