mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added logger and verbose
This commit is contained in:
parent
62a8f543f6
commit
ed8d562917
1 changed files with 3 additions and 2 deletions
|
|
@ -333,6 +333,7 @@ def get_uprn_candidates(
|
|||
def get_uprn_with_epc_df(
|
||||
user_inputed_address: str,
|
||||
epc_df: pd.DataFrame,
|
||||
verbose: bool = False,
|
||||
):
|
||||
"""
|
||||
Return uprn (str) using a pre-fetched EPC dataframe.
|
||||
|
|
@ -363,7 +364,7 @@ def get_uprn_with_epc_df(
|
|||
address = top_rank_df["address"].values[0]
|
||||
score = float(top_rank_df["lexiscore"].values[0])
|
||||
|
||||
# logger.info(f"Address found to be: {address}, with lexiscore {lexiscore}")
|
||||
logger.info(f"Address found to be: {address}, with lexiscore {score}")
|
||||
# Safe to return the agreed UPRN
|
||||
found_uprn = top_rank_df.iloc[0]["uprn"]
|
||||
|
||||
|
|
@ -379,7 +380,7 @@ def get_uprn_with_epc_df(
|
|||
def get_uprn(
|
||||
user_inputed_address: str,
|
||||
postcode: str,
|
||||
verbose=False,
|
||||
verbose: bool = False,
|
||||
):
|
||||
"""
|
||||
Return uprn (str)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue