diff --git a/ibis_ml/steps/_handle_outliers.py b/ibis_ml/steps/_handle_outliers.py index 43a6a54..140e18a 100644 --- a/ibis_ml/steps/_handle_outliers.py +++ b/ibis_ml/steps/_handle_outliers.py @@ -143,9 +143,9 @@ def transform_table(self, table: ir.Table) -> ir.Table: (table[col_name] >= stat["lower_bound"]) & (table[col_name] <= stat["upper_bound"]) | ( - (table[col_name].isnull() | table[col_name].isnan()) # noqa: PD003 - if table[col_name].type().is_floating() - else table[col_name].isnull() # noqa: PD003 + table[col_name].isnull() # noqa: PD003 + | table[col_name].type().is_floating() + & table[col_name].isnan() ) ) for col_name, stat in self.stats_.items() diff --git a/tests/test_handle_outliers.py b/tests/test_handle_outliers.py index 1815e61..0192a57 100644 --- a/tests/test_handle_outliers.py +++ b/tests/test_handle_outliers.py @@ -92,7 +92,7 @@ def test_handle_univariate_outliers( { # use same value for easier calculation statistics "int_col": [0] * 10, # mean = 0, std = 0 Q1 = 0, Q3 = 0 - "floating_col": [0.0] * 10, # mean = 0, std = 0 Q1 = 0, Q3 = 0 + "floating_col": [0.0] * 10, # mean = 0, std = 0, Q1 = 0, Q3 = 0 } )