mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
make sensible naming for column for address column in df
This commit is contained in:
parent
46ec68e5db
commit
b0e935d497
1 changed files with 4 additions and 4 deletions
|
|
@ -235,11 +235,11 @@ class AddressMatch:
|
|||
def score_addresses(
|
||||
df: pd.DataFrame,
|
||||
user_address: str,
|
||||
column: str = "address",
|
||||
address_column: str = "address",
|
||||
) -> pd.Series:
|
||||
if column not in df.columns:
|
||||
raise ValueError(f"Missing column: {column}")
|
||||
return df[column].apply(lambda x: AddressMatch.score(user_address, x))
|
||||
if address_column not in df.columns:
|
||||
raise ValueError(f"Missing column: {address_column}")
|
||||
return df[address_column].apply(lambda x: AddressMatch.score(user_address, x))
|
||||
|
||||
|
||||
def get_uprn_candidates(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue