diff --git a/src/workflows/airqo_etl_utils/airqo_utils.py b/src/workflows/airqo_etl_utils/airqo_utils.py index 8beb5d6217..9ff268a1d1 100644 --- a/src/workflows/airqo_etl_utils/airqo_utils.py +++ b/src/workflows/airqo_etl_utils/airqo_utils.py @@ -606,9 +606,8 @@ def calibrate_data(data: pd.DataFrame) -> pd.DataFrame: ] # TODO: Need to opt for a different approach eg forward fill, can't do here as df only has data of last 1 hour. Perhaps use raw data only? - default_values = {col: 0 for col in columns_to_fill} - data = data.assign(**default_values) - # data[columns_to_fill] = data[columns_to_fill].fillna(0) + # Fill nas for the specified fields. + data[columns_to_fill] = data[columns_to_fill].fillna(0) # additional input columns for calibration data["avg_pm2_5"] = data[["s1_pm2_5", "s2_pm2_5"]].mean(axis=1).round(2)