From c3e04d2d007f191f5b2e6c3b0fa7d1737e6749fd Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Tue, 28 May 2024 18:14:47 +0100 Subject: [PATCH] add temp fix for cleaned to allow for new builds to flag thermal unit --- etl/epc/Pipeline.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/etl/epc/Pipeline.py b/etl/epc/Pipeline.py index 6abf05bd..3a078703 100644 --- a/etl/epc/Pipeline.py +++ b/etl/epc/Pipeline.py @@ -64,6 +64,21 @@ def get_cleaned_description_mapping(): clean_lookup = get_cleaned_description_mapping() +# TODO: THIS IS A TEMPORARY FIX +new_walls_description_mapping = pd.DataFrame(clean_lookup["walls-description"]) + +import numpy as np + +new_walls_description_mapping["thermal_transmittance_unit"] = np.where( + ~pd.isnull(new_walls_description_mapping["thermal_transmittance_unit"]), + "w/m-¦k", + new_walls_description_mapping["thermal_transmittance_unit"], +) + +clean_lookup["walls-description"] = new_walls_description_mapping.to_dict( + orient="records" +) + class EPCPipeline: """