Added another case for main fuel

This commit is contained in:
Khalim Conn-Kowlessar 2023-07-01 17:44:53 +01:00
parent d6f83bc292
commit 5f1fe923e7
3 changed files with 8 additions and 3 deletions

View file

@ -97,7 +97,7 @@ def handler():
)
)
z = pd.DataFrame([x for x in data if x["hotwater-description"] == "From second main heating system"])
z = pd.DataFrame([x for x in data if x["main-fuel"] == "To be used only when there is no heating/hot-water system"])
# Incorporate input data into cleaning
cleaner = EpcClean(data + [p.data for p in input_properties])

View file

@ -35,7 +35,8 @@ class MainFuelAttributes(BaseUtility):
UNKNOWN_FUEL = "unknown"
NO_INDIVIDUAL_HEATING_OR_COMMUNITY_NETWORK = [
'to be used only when there is no heatinghotwater system or data is from a community network'
'to be used only when there is no heatinghotwater system or data is from a community network',
'to be used only when there is no heatinghotwater system'
]
def __init__(self, description: str):

View file

@ -52,5 +52,9 @@ mainfuel_cases = [
'fuel_type': 'waste combustion', 'tariff_type': None, 'is_community': False,
'no_individual_heating_or_community_network': False, 'complex_fuel_type': None},
{'original_description': 'wood logs', 'fuel_type': 'wood logs', 'tariff_type': None, 'is_community': False,
'no_individual_heating_or_community_network': False, 'complex_fuel_type': None}
'no_individual_heating_or_community_network': False, 'complex_fuel_type': None},
{
'original_description': 'To be used only when there is no heating/hot-water system',
'fuel_type': 'unknown', 'tariff_type': None, 'is_community': False,
'no_individual_heating_or_community_network': True, 'complex_fuel_type': None}
]