From f9b25607b6267223f7f362b41549beb693860113 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Fri, 19 Apr 2024 16:44:17 +0200 Subject: [PATCH] fix Signed-off-by: Anatoly Myachev --- modin/tests/pandas/utils.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modin/tests/pandas/utils.py b/modin/tests/pandas/utils.py index f34ff0e7c94..4a9be1dd58a 100644 --- a/modin/tests/pandas/utils.py +++ b/modin/tests/pandas/utils.py @@ -1087,14 +1087,12 @@ def eval_io_from_str(csv_str: str, unique_filename: str, **kwargs): def create_test_dfs(*args, **kwargs) -> tuple[pd.DataFrame, pandas.DataFrame]: - post_fn = kwargs.pop("post_fn", lambda df: df) - post_fn2 = lambda df: post_fn(df).convert_dtypes( - dtype_backend="dtype_backend" - ) # noqa: E731 + post_fn = kwargs.pop("post_fn", None) + + if post_fn is None: + post_fn = lambda df: df.convert_dtypes(dtype_backend="pyarrow") # noqa: E731 return tuple( - map( - post_fn2, [pd.DataFrame(*args, **kwargs), pandas.DataFrame(*args, **kwargs)] - ) + map(post_fn, [pd.DataFrame(*args, **kwargs), pandas.DataFrame(*args, **kwargs)]) ) @@ -1109,8 +1107,8 @@ def create_test_series(vals, sort=False, **kwargs) -> tuple[pd.Series, pandas.Se modin_series = modin_series.sort_values().reset_index(drop=True) pandas_series = pandas_series.sort_values().reset_index(drop=True) - modin_series = modin_series.convert_dtypes(dtype_backend="dtype_backend") - pandas_series = pandas_series.convert_dtypes(dtype_backend="dtype_backend") + modin_series = modin_series.convert_dtypes(dtype_backend="pyarrow") + pandas_series = pandas_series.convert_dtypes(dtype_backend="pyarrow") return modin_series, pandas_series