From 1bd64f2cc2ca487568d0e9f12e86b9632ff92191 Mon Sep 17 00:00:00 2001 From: NicholasTurner23 Date: Fri, 6 Dec 2024 11:41:22 +0300 Subject: [PATCH] Clean up --- src/workflows/airqo_etl_utils/data_validator.py | 10 +++++----- src/workflows/airqo_etl_utils/data_warehouse_utils.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/workflows/airqo_etl_utils/data_validator.py b/src/workflows/airqo_etl_utils/data_validator.py index e317b4224c..61b03a3a1b 100644 --- a/src/workflows/airqo_etl_utils/data_validator.py +++ b/src/workflows/airqo_etl_utils/data_validator.py @@ -159,12 +159,12 @@ def remove_outliers(data: pd.DataFrame) -> pd.DataFrame: column_name=mapped_name, row_value=x ) ) - else: - data[col] = data[col].apply( - lambda x: DataValidationUtils.get_valid_value( - column_name=mapped_name, row_value=x + else: + data[col] = data[col].apply( + lambda x: DataValidationUtils.get_valid_value( + column_name=mapped_name, row_value=x + ) ) - ) return data @staticmethod diff --git a/src/workflows/airqo_etl_utils/data_warehouse_utils.py b/src/workflows/airqo_etl_utils/data_warehouse_utils.py index 22e6a6ff06..19b3082586 100644 --- a/src/workflows/airqo_etl_utils/data_warehouse_utils.py +++ b/src/workflows/airqo_etl_utils/data_warehouse_utils.py @@ -45,7 +45,7 @@ def extract_hourly_bam_data( }, inplace=True, ) - data.loc[:, "device_category"] = str(DeviceCategory.BAM) + data["device_category"] = str(DeviceCategory.BAM) return DataWarehouseUtils.filter_valid_columns(data) @staticmethod