mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
allow for no build form
This commit is contained in:
parent
1869de9649
commit
570d463097
1 changed files with 8 additions and 1 deletions
|
|
@ -484,12 +484,19 @@ async def model_engine(body: PlanTriggerRequest):
|
|||
plan_input["uprn"] = np.where(plan_input["estimated"].isin([1, True]), None, plan_input["uprn"])
|
||||
# We handle the landlord property type and built form
|
||||
plan_input["property_type"] = plan_input["landlord_property_type"].copy()
|
||||
plan_input["built_form"] = plan_input["landlord_built_form"].copy()
|
||||
if "landlord_built_form" in plan_input.columns:
|
||||
plan_input["built_form"] = plan_input["landlord_built_form"].copy()
|
||||
else:
|
||||
plan_input["built_form"] = None
|
||||
plan_input["property_type"] = np.where(
|
||||
plan_input["property_type"] == "unknown",
|
||||
plan_input["epc_property_type"],
|
||||
plan_input["property_type"]
|
||||
)
|
||||
|
||||
if "epc_archetype" not in plan_input.columns:
|
||||
plan_input["epc_archetype"] = None
|
||||
|
||||
plan_input["built_form"] = np.where(
|
||||
plan_input["built_form"] == "unknown", plan_input["epc_archetype"], plan_input["built_form"]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue