mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
hacky fix to pick up lmk key or epc cert #
This commit is contained in:
parent
96ac34f422
commit
3380b6cbc8
4 changed files with 9 additions and 4 deletions
|
|
@ -138,7 +138,10 @@ class Addresses:
|
|||
# Handle NAN
|
||||
if pd.isnull(lmk_key):
|
||||
lmk_key = None
|
||||
|
||||
epc_certificate_number = row.get("certificate_number", None)
|
||||
if pd.isnull(epc_certificate_number):
|
||||
epc_certificate_number = None
|
||||
|
||||
landlord_heating_system = row.get("epc_heating_type", None)
|
||||
if pd.isnull(landlord_heating_system):
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class EpcStoreService:
|
|||
Service layer for EPC data lookup and persistence.
|
||||
"""
|
||||
|
||||
FRESHNESS_DAYS = 180 # Upgraded to 180 days
|
||||
FRESHNESS_DAYS = 30 # Upgraded to 30 days
|
||||
|
||||
# status labels
|
||||
FRESH = "fresh"
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ class KwhData:
|
|||
# TODO: New is a temporary parameter, which will transform the epc descriptions to their transformed features
|
||||
# in anticipation of the new model
|
||||
|
||||
data["lodgement-date"] = pd.to_datetime(data["lodgement-date"])
|
||||
data["lodgement-date"] = pd.to_datetime(data["lodgement-date"], format="mixed", errors="coerce")
|
||||
data["lodgement-year"] = data["lodgement-date"].dt.year
|
||||
data["lodgement-month"] = data["lodgement-date"].dt.month
|
||||
|
||||
|
|
@ -331,8 +331,8 @@ class KwhData:
|
|||
|
||||
def prepare_epc(self, input_properties: list[Property]):
|
||||
scoring_data = pd.DataFrame([self._prepare_epc(p) for p in input_properties])
|
||||
scoring_data["lodgement-year"] = pd.to_datetime(scoring_data["lodgement-date"]).dt.year
|
||||
scoring_data["lodgement-month"] = pd.to_datetime(scoring_data["lodgement-date"]).dt.month
|
||||
scoring_data["lodgement-year"] = pd.to_datetime(scoring_data["lodgement-date"], format="mixed").dt.year
|
||||
scoring_data["lodgement-month"] = pd.to_datetime(scoring_data["lodgement-date"], format="mixed").dt.month
|
||||
|
||||
scoring_data["id"] = scoring_data["uprn"].copy()
|
||||
|
||||
|
|
|
|||
|
|
@ -734,6 +734,8 @@ class RetrieveFindMyEpc:
|
|||
"Step 1:": [],
|
||||
"Step 2:": [],
|
||||
'Step 3:': [],
|
||||
'Step 4:': [],
|
||||
'Step 5:': [],
|
||||
"Biomass stove with boiler": [],
|
||||
"Replace boiler with biomass boiler": [],
|
||||
"Heating controls (room thermostat and thermostatic radiator valves)": [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue