fixed minor bug which commented out the averages cleaning

This commit is contained in:
Khalim Conn-Kowlessar 2023-07-03 18:31:49 +01:00
parent d9b792d23b
commit 8e65ac05cf
2 changed files with 5 additions and 2 deletions

View file

@ -3,6 +3,7 @@ from collections import Counter
import pandas as pd
from model_data.utils import correct_spelling
from model_data.epc_attributes.FloorAttributes import FloorAttributes
from model_data.epc_attributes.HotWaterAttributes import HotWaterAttributes
from model_data.epc_attributes.MainFuelAttributes import MainFuelAttributes
@ -66,6 +67,10 @@ class EpcClean:
averages = aggs.groupby("lighting-description")["low-energy-lighting"].mean().reset_index()
averages["lighting-description"] = averages["lighting-description"].str.lower()
# Correct spelling mistakes in averages
averages["lighting-description"] = averages["lighting-description"].apply(correct_spelling)
return averages
def clean(self) -> None:

View file

@ -9,8 +9,6 @@ class LightingAttributes:
self.description: str = clean_description(description.lower())
self.description = correct_spelling(self.description)
self.averages = averages
# Correct spelling mistakes in averages
# self.averages["lighting-description"] = self.averages["lighting-description"].apply(correct_spelling)
def process(self):