|
33 | 33 | from pandas.core.indexes.api import Index, RangeIndex |
34 | 34 |
|
35 | 35 | from modin.config import ( |
36 | | - Engine, |
37 | 36 | IsRayCluster, |
38 | 37 | MinColumnPartitionSize, |
39 | 38 | MinRowPartitionSize, |
@@ -1677,7 +1676,9 @@ def copy(self): |
1677 | 1676 | ) |
1678 | 1677 |
|
1679 | 1678 | @lazy_metadata_decorator(apply_axis="both") |
1680 | | - def astype(self, col_dtypes, errors: str = "raise"): |
| 1679 | + def astype( |
| 1680 | + self, col_dtypes, engine: str, storage_format: str, errors: str = "raise" |
| 1681 | + ): |
1681 | 1682 | """ |
1682 | 1683 | Convert the columns dtypes to given dtypes. |
1683 | 1684 |
|
@@ -1707,7 +1708,7 @@ def astype(self, col_dtypes, errors: str = "raise"): |
1707 | 1708 | new_dtypes = self_dtypes.copy() |
1708 | 1709 | # Update the new dtype series to the proper pandas dtype |
1709 | 1710 | new_dtype = pandas.api.types.pandas_dtype(dtype) |
1710 | | - if Engine.get() == "Dask" and hasattr(dtype, "_is_materialized"): |
| 1711 | + if engine == "Dask" and hasattr(dtype, "_is_materialized"): |
1711 | 1712 | # FIXME: https://github.com/dask/distributed/issues/8585 |
1712 | 1713 | _ = dtype._materialize_categories() |
1713 | 1714 |
|
@@ -1736,7 +1737,7 @@ def astype_builder(df): |
1736 | 1737 | if not (col_dtypes == self_dtypes).all(): |
1737 | 1738 | new_dtypes = self_dtypes.copy() |
1738 | 1739 | new_dtype = pandas.api.types.pandas_dtype(col_dtypes) |
1739 | | - if Engine.get() == "Dask" and hasattr(new_dtype, "_is_materialized"): |
| 1740 | + if engine == "Dask" and hasattr(new_dtype, "_is_materialized"): |
1740 | 1741 | # FIXME: https://github.com/dask/distributed/issues/8585 |
1741 | 1742 | _ = new_dtype._materialize_categories() |
1742 | 1743 | if isinstance(new_dtype, pandas.CategoricalDtype): |
|
0 commit comments