Skip to content

Commit

Permalink
try another dtype_backend
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Apr 19, 2024
1 parent 310f12a commit cb90479
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modin/tests/pandas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,13 @@ 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
return tuple(
map(post_fn, [pd.DataFrame(*args, **kwargs), pandas.DataFrame(*args, **kwargs)])
map(
post_fn2, [pd.DataFrame(*args, **kwargs), pandas.DataFrame(*args, **kwargs)]
)
)


Expand All @@ -1103,6 +1108,9 @@ def create_test_series(vals, sort=False, **kwargs) -> tuple[pd.Series, pandas.Se
if sort:
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")
return modin_series, pandas_series


Expand Down

0 comments on commit cb90479

Please sign in to comment.