This commit is contained in:
Michael Duong 2023-12-02 11:27:05 +00:00
parent 4102d23063
commit 1cecb34676
2 changed files with 2 additions and 3 deletions

View file

@ -217,7 +217,7 @@ class DataProcessor:
if not self.is_newdata:
# We have some odd cases with missing constituency so we fill
self.data = self.data.fillna({"CONSTITUENCY": df["CONSTITUENCY"].mode().values[0]})
self.data = self.data.fillna({"CONSTITUENCY": self.data["CONSTITUENCY"].mode().values[0]})
self.cleaning_averages = self.make_cleaning_averages()
# We apply averages cleaning to the data

View file

@ -438,9 +438,8 @@ def app():
data_processor.pre_process()
df = data_processor.data
cleaning_averages = data_processor.cleaning_averages
cleaning_dataset.append(cleaning_averages)
cleaning_dataset.append(data_processor.cleaning_averages)
data_by_urpn = []
for uprn, property_data in df.groupby("UPRN", observed=True):