Skip to content

Commit 4134cd7

Browse files
Revert "REGR: Fix interpolation on empty dataframe (#35543)"
This reverts commit 0abfc7e.
1 parent 934e9f8 commit 4134cd7

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

doc/source/whatsnew/v1.1.1.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Fixed regressions
1919
- Fixed regression where :func:`read_csv` would raise a ``ValueError`` when ``pandas.options.mode.use_inf_as_na`` was set to ``True`` (:issue:`35493`)
2020
- Fixed regression where :func:`pandas.testing.assert_series_equal` would raise an error when non-numeric dtypes were passed with ``check_exact=True`` (:issue:`35446`)
2121
- Fixed regression in :class:`pandas.core.groupby.RollingGroupby` where column selection was ignored (:issue:`35486`)
22-
- Fixed regression where :meth:`DataFrame.interpolate` would raise a ``TypeError`` when the :class:`DataFrame` was empty (:issue:`35598`).
2322
- Fixed regression in :meth:`DataFrame.shift` with ``axis=1`` and heterogeneous dtypes (:issue:`35488`)
2423
- Fixed regression in :meth:`DataFrame.diff` with read-only data (:issue:`35559`)
2524
- Fixed regression in ``.groupby(..).rolling(..)`` where a segfault would occur with ``center=True`` and an odd number of values (:issue:`35552`)

pandas/core/generic.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6892,9 +6892,6 @@ def interpolate(
68926892

68936893
obj = self.T if should_transpose else self
68946894

6895-
if obj.empty:
6896-
return self
6897-
68986895
if method not in fillna_methods:
68996896
axis = self._info_axis_number
69006897

pandas/tests/frame/methods/test_interpolate.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ def test_interp_basic(self):
3434
expected.loc[5, "B"] = 9
3535
tm.assert_frame_equal(result, expected)
3636

37-
def test_interp_empty(self):
38-
# https://github.com/pandas-dev/pandas/issues/35598
39-
df = DataFrame()
40-
result = df.interpolate()
41-
expected = df
42-
tm.assert_frame_equal(result, expected)
43-
4437
def test_interp_bad_method(self):
4538
df = DataFrame(
4639
{

0 commit comments

Comments
 (0)