internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: modin-project/modin

Issue:
REFACTOR: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version.
This warning appears even if users do not use this object directly.


Discussion:

Resolving patch:
diff --git a/modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py b/modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py
--- a/modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py
+++ b/modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py
@@ -2558,7 +2558,7 @@ def _is_trivial_index(cls, index):
             return True
         if isinstance(index, pd.RangeIndex):
             return index.start == 0 and index.step == 1
-        if not isinstance(index, pd.Int64Index):
+        if not (isinstance(index, pd.Index) and index.dtype == np.int64):
             return False
         return (
             index.is_monotonic_increasing


Test patch:
diff --git a/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py b/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
--- a/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
+++ b/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
@@ -1214,12 +1214,11 @@ def applier(df, **kwargs):
                 # At the end of reduce function it does inevitable `transpose`, which
                 # is defaulting to pandas. The following logic check that `transpose` is the only
                 # function that falling back to pandas in the reduce operation flow.
-                # Another warning comes from deprecated pandas.Int64Index usage.
                 with pytest.warns(UserWarning) as warns:
                     res = getattr(df, method)()
                 assert (
-                    len(warns) == 2
-                ), f"More than two warnings were arisen: len(warns) != 2 ({len(warns)} != 2)"
+                    len(warns) == 1
+                ), f"More than one warning was arisen: len(warns) != 1 ({len(warns)} != 1)"
                 message = warns[0].message.args[0]
                 assert (
                     re.match(r".*transpose.*defaulting to pandas", message) is not None
Repository: modin-project/modin

Issue:
CLN: `FutureWarning: the mangle_dupe_cols keyword is deprecated` for `read_excel`
This warning appears for `python` engine.


Discussion:

Resolving patch:
diff --git a/modin/core/io/io.py b/modin/core/io/io.py
--- a/modin/core/io/io.py
+++ b/modin/core/io/io.py
@@ -278,67 +278,9 @@ def read_clipboard(cls, sep=r"\s+", **kwargs):  # pragma: no cover # noqa: PR01
         returns="""BaseQueryCompiler or dict/OrderedDict :
     QueryCompiler or OrderedDict/dict with read data.""",
     )
-    def read_excel(
-        cls,
-        io,
-        sheet_name=0,
-        header=0,
-        names=None,
-        index_col=None,
-        usecols=None,
-        squeeze=False,
-        dtype=None,
-        engine=None,
-        converters=None,
-        true_values=None,
-        false_values=None,
-        skiprows=None,
-        nrows=None,
-        na_values=None,
-        keep_default_na=True,
-        verbose=False,
-        parse_dates=False,
-        date_parser=None,
-        thousands=None,
-        comment=None,
-        skip_footer=0,
-        skipfooter=0,
-        convert_float=True,
-        mangle_dupe_cols=True,
-        na_filter=True,
-        **kwds,
-    ):  # noqa: PR01
-        if skip_footer != 0:
-            skipfooter = skip_footer
+    def read_excel(cls, **kwargs):  # noqa: PR01
         ErrorMessage.default_to_pandas("`read_excel`")
-        intermediate = pandas.read_excel(
-            io,
-            sheet_name=sheet_name,
-            header=header,
-            names=names,
-            index_col=index_col,
-            usecols=usecols,
-            squeeze=squeeze,
-            dtype=dtype,
-            engine=engine,
-            converters=converters,
-            true_values=true_values,
-            false_values=false_values,
-            skiprows=skiprows,
-            nrows=nrows,
-            na_values=na_values,
-            keep_default_na=keep_default_na,
-            verbose=verbose,
-            parse_dates=parse_dates,
-            date_parser=date_parser,
-            thousands=thousands,
-            comment=comment,
-            skipfooter=skipfooter,
-            convert_float=convert_float,
-            mangle_dupe_cols=mangle_dupe_cols,
-            na_filter=na_filter,
-            **kwds,
-        )
+        intermediate = pandas.read_excel(**kwargs)
         if isinstance(intermediate, (OrderedDict, dict)):
             parsed = type(intermediate)()
             for key in intermediate.keys():


Test patch:
Repository: modin-project/modin

Issue:
ASV: benchmark timed out (timeout 60.0s) for `TimeReindex` class
Due to this error, some cases are not displayed on ASV charts.


Discussion:

Resolving patch:
diff --git a/asv_bench/benchmarks/benchmarks.py b/asv_bench/benchmarks/benchmarks.py
--- a/asv_bench/benchmarks/benchmarks.py
+++ b/asv_bench/benchmarks/benchmarks.py
@@ -901,14 +901,14 @@ def setup(self, shape):
         self.df2 = IMPL.DataFrame(
             index=range(rows), data=np.random.rand(rows, cols), columns=range(cols)
         )
-        level1 = tm.makeStringIndex(rows).values.repeat(cols)
-        level2 = np.tile(tm.makeStringIndex(cols).values, rows)
+        level1 = tm.makeStringIndex(rows // 10).values.repeat(10)
+        level2 = np.tile(tm.makeStringIndex(10).values, rows // 10)
         index = IMPL.MultiIndex.from_arrays([level1, level2])
-        self.s = IMPL.Series(np.random.randn(rows * cols), index=index)
+        self.s = IMPL.Series(np.random.randn(rows), index=index)
         self.s_subset = self.s[::2]
         self.s_subset_no_cache = self.s[::2].copy()
 
-        mi = IMPL.MultiIndex.from_product([rng, range(100)])
+        mi = IMPL.MultiIndex.from_product([rng[: len(rng) // 10], range(10)])
         self.s2 = IMPL.Series(np.random.randn(len(mi)), index=mi)
         self.s2_subset = self.s2[::2].copy()
         execute(self.df), execute(self.df2)


Test patch:
Repository: modin-project/modin

Issue:
ASV: benchmark timed out (timeout 60.0s) for `TimeMerge` class
Due to this error, some cases are not displayed on ASV charts.


Discussion:

Resolving patch:
diff --git a/asv_bench/benchmarks/benchmarks.py b/asv_bench/benchmarks/benchmarks.py
--- a/asv_bench/benchmarks/benchmarks.py
+++ b/asv_bench/benchmarks/benchmarks.py
@@ -173,6 +173,22 @@ def time_join_dataframe_index_single_key_small(self, shapes, sort):
         execute(self.df.join(self.df_key1, on="key1", sort=sort))
 
 
+class TimeMergeDefault:
+    param_names = ["shapes", "how", "sort"]
+    params = [
+        get_benchmark_shapes("TimeMergeDefault"),
+        ["left", "inner"],
+        [True, False],
+    ]
+
+    def setup(self, shapes, how, sort):
+        self.df1 = generate_dataframe("int", *shapes[0], RAND_LOW, RAND_HIGH)
+        self.df2 = generate_dataframe("int", *shapes[1], RAND_LOW, RAND_HIGH)
+
+    def time_merge(self, shapes, how, sort):
+        execute(IMPL.merge(self.df1, self.df2, how=how, sort=sort))
+
+
 class TimeMerge:
     param_names = ["shapes", "how", "sort"]
     params = [
@@ -193,9 +209,6 @@ def time_merge(self, shapes, how, sort):
             )
         )
 
-    def time_merge_default(self, shapes, how, sort):
-        execute(IMPL.merge(self.df1, self.df2, how=how, sort=sort))
-
     def time_merge_dataframe_empty_right(self, shapes, how, sort):
         # Getting an empty dataframe using `iloc` should be very fast,
         # so the impact on the time of the merge operation should be negligible.
diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py
--- a/asv_bench/benchmarks/utils/data_shapes.py
+++ b/asv_bench/benchmarks/utils/data_shapes.py
@@ -124,6 +124,7 @@
             # Pandas storage format benchmarks
             "TimeJoin",
             "TimeMerge",
+            "TimeMergeDefault",
             "TimeConcat",
             "TimeAppend",
             "TimeBinaryOp",
@@ -198,6 +199,13 @@
     for _shape, _names in config:
         DEFAULT_CONFIG.update({_name: _shape for _name in _names})
 
+# Correct forms in the case when the operation ended with a timeout error
+if ASV_DATASET_SIZE == "big":
+    DEFAULT_CONFIG["TimeMergeDefault"] = [
+        [[1000, 1000], [1000, 1000]],
+        [[500_000, 20], [1_000_000, 10]],
+    ]
+
 CONFIG_FROM_FILE = None
 
 


Test patch:
Repository: modin-project/modin

Issue:
ASV: benchmark timed out (timeout 60.0s) for `TimeLevelAlign`, `TimeStack`, `TimeUnstack`
Due to this error, some cases are not displayed on ASV charts.


Discussion:

Resolving patch:
diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py
--- a/asv_bench/benchmarks/utils/data_shapes.py
+++ b/asv_bench/benchmarks/utils/data_shapes.py
@@ -199,12 +199,21 @@
     for _shape, _names in config:
         DEFAULT_CONFIG.update({_name: _shape for _name in _names})
 
-# Correct forms in the case when the operation ended with a timeout error
+# Correct shapes in the case when the operation ended with a timeout error
 if ASV_DATASET_SIZE == "big":
     DEFAULT_CONFIG["TimeMergeDefault"] = [
         [[1000, 1000], [1000, 1000]],
         [[500_000, 20], [1_000_000, 10]],
     ]
+    DEFAULT_CONFIG["TimeLevelAlign"] = [
+        [[2500, 2500], [2500, 2500]],
+        [[250_000, 20], [500_000, 10]],
+    ]
+    DEFAULT_CONFIG["TimeStack"] = [
+        [1500, 1500],
+        [100_000, 10],
+    ]
+    DEFAULT_CONFIG["TimeUnstack"] = DEFAULT_CONFIG["TimeStack"]
 
 CONFIG_FROM_FILE = None
 


Test patch:
Repository: modin-project/modin

Issue:
REFACTOR: update execution.ray public api with virtual partitions as it done for execution.dask



Discussion:

Resolving patch:
diff --git a/modin/core/execution/ray/implementations/pandas_on_ray/partitioning/__init__.py b/modin/core/execution/ray/implementations/pandas_on_ray/partitioning/__init__.py
--- a/modin/core/execution/ray/implementations/pandas_on_ray/partitioning/__init__.py
+++ b/modin/core/execution/ray/implementations/pandas_on_ray/partitioning/__init__.py
@@ -15,8 +15,16 @@
 
 from .partition import PandasOnRayDataframePartition
 from .partition_manager import PandasOnRayDataframePartitionManager
+from .virtual_partition import (
+    PandasOnRayDataframeVirtualPartition,
+    PandasOnRayDataframeColumnPartition,
+    PandasOnRayDataframeRowPartition,
+)
 
 __all__ = [
     "PandasOnRayDataframePartition",
     "PandasOnRayDataframePartitionManager",
+    "PandasOnRayDataframeVirtualPartition",
+    "PandasOnRayDataframeColumnPartition",
+    "PandasOnRayDataframeRowPartition",
 ]


Test patch:
diff --git a/modin/pandas/test/internals/test_benchmark_mode.py b/modin/pandas/test/internals/test_benchmark_mode.py
--- a/modin/pandas/test/internals/test_benchmark_mode.py
+++ b/modin/pandas/test/internals/test_benchmark_mode.py
@@ -23,8 +23,8 @@
 # We have to explicitly mock subclass implementations of wait_partitions.
 if engine == "Ray":
     wait_method = (
-        "modin.core.execution.ray.implementations.pandas_on_ray."
-        + "partitioning.partition_manager."
+        "modin.core.execution.ray.implementations."
+        + "pandas_on_ray.partitioning."
         + "PandasOnRayDataframePartitionManager.wait_partitions"
     )
 elif engine == "Dask":
diff --git a/modin/test/storage_formats/pandas/test_internals.py b/modin/test/storage_formats/pandas/test_internals.py
--- a/modin/test/storage_formats/pandas/test_internals.py
+++ b/modin/test/storage_formats/pandas/test_internals.py
@@ -29,10 +29,10 @@
 
 if Engine.get() == "Ray":
     import ray
-    from modin.core.execution.ray.implementations.pandas_on_ray.partitioning.partition import (
+    from modin.core.execution.ray.implementations.pandas_on_ray.partitioning import (
         PandasOnRayDataframePartition,
     )
-    from modin.core.execution.ray.implementations.pandas_on_ray.partitioning.virtual_partition import (
+    from modin.core.execution.ray.implementations.pandas_on_ray.partitioning import (
         PandasOnRayDataframeColumnPartition,
         PandasOnRayDataframeRowPartition,
     )
Repository: modin-project/modin

Issue:
BUG: TypeError: read_sas() takes 1 positional argument but 2 were given



Discussion:

Resolving patch:
diff --git a/modin/pandas/io.py b/modin/pandas/io.py
--- a/modin/pandas/io.py
+++ b/modin/pandas/io.py
@@ -579,7 +579,7 @@ def read_sas(
 
     return DataFrame(
         query_compiler=FactoryDispatcher.read_sas(
-            filepath_or_buffer,
+            filepath_or_buffer=filepath_or_buffer,
             format=format,
             index=index,
             encoding=encoding,


Test patch:
diff --git a/modin/pandas/test/data/airline.sas7bdat b/modin/pandas/test/data/airline.sas7bdat
new file mode 100644
Binary files /dev/null and b/modin/pandas/test/data/airline.sas7bdat differ
diff --git a/modin/pandas/test/test_io.py b/modin/pandas/test/test_io.py
--- a/modin/pandas/test/test_io.py
+++ b/modin/pandas/test/test_io.py
@@ -2430,6 +2430,15 @@ def test_to_stata(self):
         )
 
 
+class TestSas:
+    def test_read_sas(self):
+        eval_io(
+            fn_name="read_sas",
+            # read_stata kwargs
+            filepath_or_buffer="modin/pandas/test/data/airline.sas7bdat",
+        )
+
+
 class TestFeather:
     @pytest.mark.xfail(
         condition="config.getoption('--simulate-cloud').lower() != 'off'",
Repository: modin-project/modin

Issue:
FutureWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)`



Discussion:

Resolving patch:
diff --git a/modin/core/dataframe/pandas/utils.py b/modin/core/dataframe/pandas/utils.py
--- a/modin/core/dataframe/pandas/utils.py
+++ b/modin/core/dataframe/pandas/utils.py
@@ -40,7 +40,7 @@ def concatenate(dfs):
         columns = [df.iloc[:, i] for df in dfs]
         union = union_categoricals(columns)
         for df in dfs:
-            df.iloc[:, i] = pandas.Categorical(
-                df.iloc[:, i], categories=union.categories
+            df.isetitem(
+                i, pandas.Categorical(df.iloc[:, i], categories=union.categories)
             )
     return pandas.concat(dfs)


Test patch:
Repository: modin-project/modin

Issue:
REFACTOR: missed future warnings for `DataFrameGroupBy.backfill`



Discussion:

Resolving patch:
diff --git a/modin/pandas/groupby.py b/modin/pandas/groupby.py
--- a/modin/pandas/groupby.py
+++ b/modin/pandas/groupby.py
@@ -13,6 +13,8 @@
 
 """Implement GroupBy public API as pandas does."""
 
+import warnings
+
 import numpy as np
 import pandas
 from pandas.core.apply import reconstruct_func
@@ -446,6 +448,14 @@ def first(self, **kwargs):
         return self._default_to_pandas(lambda df: df.first(**kwargs))
 
     def backfill(self, limit=None):
+        warnings.warn(
+            (
+                "backfill is deprecated and will be removed in a future version. "
+                + "Use bfill instead."
+            ),
+            FutureWarning,
+            stacklevel=2,
+        )
         return self.bfill(limit)
 
     _internal_by_cache = no_default
@@ -703,6 +713,14 @@ def last(self, **kwargs):
         return self._default_to_pandas(lambda df: df.last(**kwargs))
 
     def mad(self, **kwargs):
+        warnings.warn(
+            (
+                "The 'mad' method is deprecated and will be removed in a future version. "
+                + "To compute the same result, you may do `(df - df.mean()).abs().mean()`."
+            ),
+            FutureWarning,
+            stacklevel=2,
+        )
         return self._default_to_pandas(lambda df: df.mad(**kwargs))
 
     def rank(self, **kwargs):


Test patch:
diff --git a/modin/pandas/test/test_groupby.py b/modin/pandas/test/test_groupby.py
--- a/modin/pandas/test/test_groupby.py
+++ b/modin/pandas/test/test_groupby.py
@@ -2182,6 +2182,26 @@ def test_mean_with_datetime(by_func):
     eval_general(modin_df, pandas_df, lambda df: df.groupby(by=by_func(df)).mean())
 
 
+def test_groupby_mad_warn():
+    modin_df, pandas_df = create_test_dfs(test_groupby_data)
+    md_grp = modin_df.groupby(by=modin_df.columns[0])
+    pd_grp = pandas_df.groupby(by=pandas_df.columns[0])
+
+    msg = "The 'mad' method is deprecated and will be removed in a future version."
+    for grp_obj in (md_grp, pd_grp):
+        with pytest.warns(FutureWarning, match=msg):
+            grp_obj.mad()
+
+
+def test_groupby_backfill_warn():
+    modin_df = pd.DataFrame(test_groupby_data)
+    md_grp = modin_df.groupby(by=modin_df.columns[0])
+
+    msg = "backfill is deprecated and will be removed in a future version."
+    with pytest.warns(FutureWarning, match=msg):
+        md_grp.backfill()
+
+
 @pytest.mark.parametrize(
     "modin_df_recipe",
     ["non_lazy_frame", "frame_with_deferred_index", "lazy_frame"],
Repository: modin-project/modin

Issue:
REFACTOR: Update execution.unidist public api with virtual partitions



Discussion:

Resolving patch:
diff --git a/modin/core/execution/unidist/implementations/pandas_on_unidist/partitioning/__init__.py b/modin/core/execution/unidist/implementations/pandas_on_unidist/partitioning/__init__.py
--- a/modin/core/execution/unidist/implementations/pandas_on_unidist/partitioning/__init__.py
+++ b/modin/core/execution/unidist/implementations/pandas_on_unidist/partitioning/__init__.py
@@ -13,12 +13,18 @@
 
 """Base Modin Dataframe classes related to its partitioning and optimized for pandas on unidist execution."""
 
-from .partition_manager import PandasOnUnidistDataframePartitionManager
-from .virtual_partition import PandasOnUnidistDataframeVirtualPartition
 from .partition import PandasOnUnidistDataframePartition
+from .partition_manager import PandasOnUnidistDataframePartitionManager
+from .virtual_partition import (
+    PandasOnUnidistDataframeVirtualPartition,
+    PandasOnUnidistDataframeColumnPartition,
+    PandasOnUnidistDataframeRowPartition,
+)
 
 __all__ = [
     "PandasOnUnidistDataframePartitionManager",
-    "PandasOnUnidistDataframeVirtualPartition",
     "PandasOnUnidistDataframePartition",
+    "PandasOnUnidistDataframeVirtualPartition",
+    "PandasOnUnidistDataframeColumnPartition",
+    "PandasOnUnidistDataframeRowPartition",
 ]


Test patch:
diff --git a/modin/pandas/test/internals/test_benchmark_mode.py b/modin/pandas/test/internals/test_benchmark_mode.py
--- a/modin/pandas/test/internals/test_benchmark_mode.py
+++ b/modin/pandas/test/internals/test_benchmark_mode.py
@@ -36,7 +36,7 @@
 elif engine == "Unidist":
     wait_method = (
         "modin.core.execution.unidist.implementations."
-        + "pandas_on_unidist.partitioning.partition_manager."
+        + "pandas_on_unidist.partitioning."
         + "PandasOnUnidistDataframePartitionManager.wait_partitions"
     )
 else:
Repository: modin-project/modin

Issue:
[PERF] compute `dtypes` when performing `from_labels` operation
It should be possible and beneficial to compute `dtypes` when doing `from_labels` operation without remote calls so other subsequent operations, which require `dypes` to be known, do not perform the remote calls to compute it.

For example, we could perform something like that to compute `dtypes` in `from_labels`.

```python
new_dtypes = self.index.to_frame().dtypes
new_dtypes = pandas.concat([new_dtypes, self.dtypes])
```


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
@@ -967,7 +967,6 @@ def from_labels(self) -> "PandasDataframe":
             A PandasDataframe with new columns from index labels.
         """
         new_row_labels = pandas.RangeIndex(len(self.index))
-
         if self.index.nlevels > 1:
             level_names = [
                 self.index.names[i]
@@ -983,6 +982,11 @@ def from_labels(self) -> "PandasDataframe":
                 if "index" not in self.columns
                 else "level_{}".format(0)
             ]
+        new_dtypes = None
+        if self._dtypes is not None:
+            names = tuple(level_names) if len(level_names) > 1 else level_names[0]
+            new_dtypes = self.index.to_frame(name=names).dtypes
+            new_dtypes = pandas.concat([new_dtypes, self._dtypes])
 
         # We will also use the `new_column_names` in the calculation of the internal metadata, so this is a
         # lightweight way of ensuring the metadata matches.
@@ -1040,6 +1044,7 @@ def from_labels_executor(df, **kwargs):
             new_columns,
             row_lengths=self._row_lengths_cache,
             column_widths=new_column_widths,
+            dtypes=new_dtypes,
         )
         # Set flag for propagating deferred row labels across dataframe partitions
         result.synchronize_labels(axis=0)


Test patch:
Repository: modin-project/modin

Issue:
series __int__ function implementation



Discussion:
this lets you convert a one-element series to an int, e.g. `import pandas; print(int(pandas.Series(1)))`

Resolving patch:
diff --git a/modin/pandas/series.py b/modin/pandas/series.py
--- a/modin/pandas/series.py
+++ b/modin/pandas/series.py
@@ -23,6 +23,7 @@
     is_dict_like,
     is_list_like,
 )
+from pandas.core.series import _coerce_method
 from pandas._libs.lib import no_default, NoDefault
 from pandas._typing import IndexKeyFunc, Axis
 from typing import Union, Optional, Hashable, TYPE_CHECKING, IO
@@ -271,16 +272,6 @@ def __divmod__(self, right):
     def __rdivmod__(self, left):
         return self.rdivmod(left)
 
-    def __float__(self):
-        """
-        Return float representation of Series.
-
-        Returns
-        -------
-        float
-        """
-        return float(self.squeeze())
-
     @_doc_binary_op(operation="integer division", bin_op="floordiv")
     def __floordiv__(self, right):
         return self.floordiv(right)
@@ -314,15 +305,8 @@ def __getattr__(self, key):
                 return self[key]
             raise err
 
-    def __int__(self):
-        """
-        Return integer representation of Series.
-
-        Returns
-        -------
-        int
-        """
-        return int(self.squeeze())
+    __float__ = _coerce_method(float)
+    __int__ = _coerce_method(int)
 
     def __iter__(self):
         """


Test patch:
diff --git a/modin/pandas/test/test_series.py b/modin/pandas/test/test_series.py
--- a/modin/pandas/test/test_series.py
+++ b/modin/pandas/test/test_series.py
@@ -396,16 +396,14 @@ def test___gt__(data):
     inter_df_math_helper(modin_series, pandas_series, "__gt__")
 
 
-@pytest.mark.parametrize("data", test_data_values, ids=test_data_keys)
-def test___int__(data):
-    modin_series, pandas_series = create_test_series(data)
-    try:
-        pandas_result = int(pandas_series[0])
-    except Exception as err:
-        with pytest.raises(type(err)):
-            int(modin_series[0])
-    else:
-        assert int(modin_series[0]) == pandas_result
+@pytest.mark.parametrize("count_elements", [0, 1, 10])
+def test___int__(count_elements):
+    eval_general(*create_test_series([1.5] * count_elements), int)
+
+
+@pytest.mark.parametrize("count_elements", [0, 1, 10])
+def test___float__(count_elements):
+    eval_general(*create_test_series([1] * count_elements), float)
 
 
 @pytest.mark.parametrize("data", test_data_values, ids=test_data_keys)