enforcing datetime is string

This commit is contained in:
Khalim Conn-Kowlessar 2024-10-01 16:31:18 +01:00
parent c5b7775a23
commit fc1468efda

View file

@ -259,6 +259,9 @@ class KwhData:
# Create new features:
data['estimate_annual_kwh'] = data['energy-consumption-current'] * data['total-floor-area']
# Ensure this is string, because we could have mixed types
data["lodgement-datetime"] = data["lodgement-datetime"].astype(str)
if save:
self.model_training_data_filepath = f"energy_consumption/{self.run_date}/training_data.parquet"
logger.info(f"Storing energy consumption dataset in s3 at {self.consumption_data_filepath}")