mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
fixing datetime bug in SearchEpc
This commit is contained in:
parent
86dd6efdc3
commit
e7c0b9169c
2 changed files with 13 additions and 13 deletions
|
|
@ -472,7 +472,7 @@ class SearchEpc:
|
||||||
|
|
||||||
if not epc_data.empty:
|
if not epc_data.empty:
|
||||||
# Further processing of the EPC data
|
# Further processing of the EPC data
|
||||||
epc_data['lodgement-datetime'] = pd.to_datetime(epc_data['lodgement-datetime'], format='mixed')
|
epc_data['lodgement-datetime'] = pd.to_datetime(epc_data['lodgement-datetime'], errors='coerce')
|
||||||
epc_data = epc_data.sort_values("lodgement-datetime", ascending=False).groupby("uprn").head(1)
|
epc_data = epc_data.sort_values("lodgement-datetime", ascending=False).groupby("uprn").head(1)
|
||||||
epc_data["house_number"] = epc_data["address"].apply(lambda add1: self.get_house_number(add1))
|
epc_data["house_number"] = epc_data["address"].apply(lambda add1: self.get_house_number(add1))
|
||||||
epc_data["numeric_house_number"] = epc_data["house_number"].apply(
|
epc_data["numeric_house_number"] = epc_data["house_number"].apply(
|
||||||
|
|
|
||||||
|
|
@ -66,18 +66,18 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
)
|
)
|
||||||
|
|
||||||
# For testing:
|
# For testing:
|
||||||
plan_input.extend(
|
# plan_input.extend(
|
||||||
[
|
# [
|
||||||
{'address': '73 Long Chaulden', 'postcode': 'HP1 2HX', 'Notes': ''},
|
# {'address': '73 Long Chaulden', 'postcode': 'HP1 2HX', 'Notes': ''},
|
||||||
{'address': '8 Lindlings', 'postcode': 'HP1 2HA', 'Notes': ''},
|
# {'address': '8 Lindlings', 'postcode': 'HP1 2HA', 'Notes': ''},
|
||||||
{'address': '44 Lindlings', 'postcode': 'HP1 2HE', 'Notes': ''},
|
# {'address': '44 Lindlings', 'postcode': 'HP1 2HE', 'Notes': ''},
|
||||||
{'address': '46 Chaulden Terrace', 'postcode': 'HP1 2AN', 'Notes': ''},
|
# {'address': '46 Chaulden Terrace', 'postcode': 'HP1 2AN', 'Notes': ''},
|
||||||
{'address': '4, Heather Shaw', 'postcode': 'BA14 7JS', 'Notes': ''},
|
# {'address': '4, Heather Shaw', 'postcode': 'BA14 7JS', 'Notes': ''},
|
||||||
{'address': '16 Glastonbury Road', 'postcode': 'M32 9PE', 'Notes': ''},
|
# {'address': '16 Glastonbury Road', 'postcode': 'M32 9PE', 'Notes': ''},
|
||||||
{'address': '31 Loddon Way', 'postcode': 'BA15 1HG', 'Notes': ''},
|
# {'address': '31 Loddon Way', 'postcode': 'BA15 1HG', 'Notes': ''},
|
||||||
{'address': '62 Pearmain Drive', 'postcode': 'NG3 3DJ', 'Notes': ''},
|
# {'address': '62 Pearmain Drive', 'postcode': 'NG3 3DJ', 'Notes': ''},
|
||||||
]
|
# ]
|
||||||
)
|
# )
|
||||||
|
|
||||||
input_properties = []
|
input_properties = []
|
||||||
for config in plan_input:
|
for config in plan_input:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue