diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 6ffe50e3..bd4d5128 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -44,7 +44,7 @@ class DataLoader: "HA14": 3, # There's just too many unmatched here "HA6": 117, - "HA107": 52 + "HA107": 51 } def __init__(self, directories, december_figures_filepath, use_cache): @@ -54,6 +54,7 @@ class DataLoader: self.data = {} self.december_figures = None + self.ha_facts_and_figures = None def create_asset_list_matching_address(self, ha_name, asset_list): @@ -794,7 +795,8 @@ class DataLoader: } eco_eligibility_map = { - "not eligble": "not eligible" + "not eligble": "not eligible", + "eco 4(subject to ciga)": "eco4 (subject to ciga)", } ha_facts_and_figures = [] @@ -919,9 +921,15 @@ class DataLoader: columns=["not eligible"] ) - ha_facts_and_figures = self.december_figures.merge(ha_facts_and_figures, how="inner", on="HA Name") + ha_facts_and_figures = ha_facts_and_figures.fillna(0) + # Make all columns apart from HA NAme integers + for col in ha_facts_and_figures.columns[1:]: + ha_facts_and_figures[col] = ha_facts_and_figures[col].astype(int) - return ha_facts_and_figures + ha_facts_and_figures = self.december_figures.merge(ha_facts_and_figures, how="inner", on="HA Name") + ha_facts_and_figures = ha_facts_and_figures.fillna(0) + + self.ha_facts_and_figures = ha_facts_and_figures def get_epc_data(