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):