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 f0813aef..7ad50583 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -479,7 +479,7 @@ class DataLoader: # lists, and so # we can return the asset list now if ha_name in ["HA1"]: - return asset_list, pd.DataFrame(), pd.DataFrame() + return asset_list, pd.DataFrame(), pd.DataFrame(), pd.DataFrame() # If we have ECO3 surveys, we need to match them, because any properties treated under ECO3 won't be # suitable under ECO4, since their walls will be filled @@ -504,6 +504,10 @@ class DataLoader: # Perform the eco3 merge eco3_list = self.merge_eco3_to_assets(asset_list, eco3_list, ha_name) + if ha_name in ["HA25"]: + # Accomodate ha25 unique structure + return asset_list, pd.DataFrame(), pd.DataFrame(), eco3_list + # We check if there is a survey list survey_sheetname = self.get_survey_sheetname(workbook) survey_sheet = workbook[survey_sheetname] @@ -1592,7 +1596,7 @@ class DataLoader: # Merge onto eco3 list eco3_list = eco3_list.merge(matching_lookup, how="left", on="eco3_list_row_id") - asset_list = asset_list.drop(columns=["matching_address_no_punctuation"]) + asset_list.drop(columns=["matching_address_no_punctuation"], inplace=True) return eco3_list @@ -1756,7 +1760,7 @@ class DataLoader: continue # Load asset list logger.info("Loading data for {}".format(ha_name)) - asset_list, survey_list, ciga_list = self.load_asset_list( + asset_list, survey_list, ciga_list, eco3_list = self.load_asset_list( filepath=filepath, ha_name=ha_name, ) @@ -1764,7 +1768,8 @@ class DataLoader: data[ha_name] = { "asset_list": asset_list, "survey_list": survey_list, - "ciga_list": ciga_list + "ciga_list": ciga_list, + "eco3_list": eco3_list } self.data = data