From 35e3fb124e24da14e06c00ae55af0098943697a0 Mon Sep 17 00:00:00 2001 From: Yerzhaisang Date: Tue, 13 Feb 2024 09:42:52 +0500 Subject: [PATCH] Fixed the lint and took the update from main Signed-off-by: Yerzhaisang --- opensearch_py_ml/dataframe.py | 2 +- tests/common.py | 1 + tests/dataframe/test_metrics_pytest.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opensearch_py_ml/dataframe.py b/opensearch_py_ml/dataframe.py index 35974dc9..31c5a49a 100644 --- a/opensearch_py_ml/dataframe.py +++ b/opensearch_py_ml/dataframe.py @@ -424,7 +424,7 @@ def drop( axis = pd.DataFrame._get_axis_name(axis) axes = {axis: labels} elif index is not None or columns is not None: - axes = {'index': index, 'columns': columns} + axes = {"index": index, "columns": columns} else: raise ValueError( "Need to specify at least one of 'labels', 'index' or 'columns'" diff --git a/tests/common.py b/tests/common.py index d45ddde7..61378609 100644 --- a/tests/common.py +++ b/tests/common.py @@ -165,5 +165,6 @@ def mad(x): x = x[numeric_columns] return np.fabs(x - x.mean()).mean() + def quantile(x, numeric_only=None): return x.quantile() diff --git a/tests/dataframe/test_metrics_pytest.py b/tests/dataframe/test_metrics_pytest.py index bad00ca7..1d9f05a2 100644 --- a/tests/dataframe/test_metrics_pytest.py +++ b/tests/dataframe/test_metrics_pytest.py @@ -29,7 +29,7 @@ import pytest from pandas.testing import assert_frame_equal, assert_series_equal -from tests.common import TestData, assert_almost_equal, quantile, mad +from tests.common import TestData, assert_almost_equal, mad, quantile class TestDataFrameMetrics(TestData):