Repository: modin-project/modin

Issue:
REFACTOR: Delete PandasDataFrame.combine_dtypes
### System information
- **Modin version** (`modin.__version__`): 98d3dbf70bb19571e0864ccbeccc14d5c61a5dad

The function is defined [here](https://github.com/modin-project/modin/blob/81648e711f7525d87dbc58f53e67a2fd22650ae7/modin/core/dataframe/pandas/dataframe/dataframe.py#L965) and overridden in two subclasses, but we never use it.


Discussion:

Resolving patch:
diff --git a/modin/core/dataframe/pandas/dataframe/dataframe.py b/modin/core/dataframe/pandas/dataframe/dataframe.py
--- a/modin/core/dataframe/pandas/dataframe/dataframe.py
+++ b/modin/core/dataframe/pandas/dataframe/dataframe.py
@@ -961,35 +961,6 @@ def copy(self):
             self._dtypes,
         )
 
-    @classmethod
-    def combine_dtypes(cls, list_of_dtypes, column_names):
-        """
-        Describe how data types should be combined when they do not match.
-
-        Parameters
-        ----------
-        list_of_dtypes : list
-            A list of pandas Series with the data types.
-        column_names : list
-            The names of the columns that the data types map to.
-
-        Returns
-        -------
-        pandas.Series
-             A pandas Series containing the finalized data types.
-        """
-        # Compute dtypes by getting collecting and combining all of the partitions. The
-        # reported dtypes from differing rows can be different based on the inference in
-        # the limited data seen by each worker. We use pandas to compute the exact dtype
-        # over the whole column for each column.
-        dtypes = (
-            pandas.concat(list_of_dtypes, axis=1)
-            .apply(lambda row: find_common_type(row.values), axis=1)
-            .squeeze(axis=0)
-        )
-        dtypes.index = column_names
-        return dtypes
-
     @lazy_metadata_decorator(apply_axis="both")
     def astype(self, col_dtypes):
         """
diff --git a/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py b/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py
--- a/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py
+++ b/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py
@@ -13,15 +13,8 @@
 
 """Module houses class that implements ``PandasDataframe`` using Ray."""
 
-import pandas
-
 from ..partitioning.partition_manager import PandasOnRayDataframePartitionManager
 from modin.core.dataframe.pandas.dataframe.dataframe import PandasDataframe
-from modin.core.storage_formats.pandas.parsers import (
-    find_common_type_cat as find_common_type,
-)
-
-import ray
 
 
 class PandasOnRayDataframe(PandasDataframe):
@@ -47,32 +40,3 @@ class PandasOnRayDataframe(PandasDataframe):
     """
 
     _partition_mgr_cls = PandasOnRayDataframePartitionManager
-
-    @classmethod
-    def combine_dtypes(cls, list_of_dtypes, column_names):
-        """
-        Describe how data types should be combined when they do not match.
-
-        Parameters
-        ----------
-        list_of_dtypes : list
-            A list of ``pandas.Series`` with the data types.
-        column_names : list
-            The names of the columns that the data types map to.
-
-        Returns
-        -------
-        pandas.Series
-             A ``pandas.Series`` containing the finalized data types.
-        """
-        # Compute dtypes by getting collecting and combining all of the partitions. The
-        # reported dtypes from differing rows can be different based on the inference in
-        # the limited data seen by each worker. We use pandas to compute the exact dtype
-        # over the whole column for each column.
-        dtypes = (
-            pandas.concat(ray.get(list_of_dtypes), axis=1)
-            .apply(lambda row: find_common_type(row.values), axis=1)
-            .squeeze(axis=0)
-        )
-        dtypes.index = column_names
-        return dtypes
diff --git a/modin/experimental/core/execution/ray/implementations/pyarrow_on_ray/dataframe/dataframe.py b/modin/experimental/core/execution/ray/implementations/pyarrow_on_ray/dataframe/dataframe.py
--- a/modin/experimental/core/execution/ray/implementations/pyarrow_on_ray/dataframe/dataframe.py
+++ b/modin/experimental/core/execution/ray/implementations/pyarrow_on_ray/dataframe/dataframe.py
@@ -17,14 +17,9 @@
 ``PyarrowOnRayDataframe`` is a dataframe class with PyArrow storage format and Ray engine.
 """
 
-import pandas
-from pandas.core.dtypes.cast import find_common_type
-
 from ..partitioning.partition_manager import PyarrowOnRayDataframePartitionManager
 from modin.core.dataframe.pandas.dataframe.dataframe import PandasDataframe
 
-import ray
-
 
 class PyarrowOnRayDataframe(PandasDataframe):
     """
@@ -64,39 +59,6 @@ def synchronize_labels(self, axis=None):
         """
         self._filter_empties()
 
-    @classmethod
-    def combine_dtypes(cls, list_of_dtypes, column_names):
-        """
-        Get common for all partitions dtype for each of the columns.
-
-        Parameters
-        ----------
-        list_of_dtypes : array-like
-            Array with references to the partitions dtypes objects.
-        column_names : array-like or pandas.Index
-            Columns names to use for resulting Series.
-
-        Returns
-        -------
-        pandas.Series
-            pandas.Series where index is columns names and values are
-            columns dtypes.
-
-        Notes
-        -----
-        The reported dtypes from differing rows can be different based
-        on the inference in the limited data seen by each worker. We
-        use pandas to compute the exact dtype over the whole column for
-        each column.
-        """
-        dtypes = (
-            pandas.concat(ray.get(list_of_dtypes), axis=1)
-            .apply(lambda row: find_common_type(row.values), axis=1)
-            .squeeze(axis=0)
-        )
-        dtypes.index = column_names
-        return dtypes
-
     def to_pandas(self):
         """
         Convert frame object to a ``pandas.DataFrame``.


Test patch: