Skip to content

Commit

Permalink
BUG: interpolate raising wrong error for ea
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Oct 1, 2023
1 parent 6f0cd8d commit 9320144
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v2.1.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Fixed regressions

Bug fixes
~~~~~~~~~
- Fixed bug in :meth:`DataFrame.interpolate` raising incorrect error message (:issue:`55347`)
- Fixed bug in :meth:`DataFrame.resample` not respecting ``closed`` and ``label`` arguments for :class:`~pandas.tseries.offsets.BusinessDay` (:issue:`55282`)
- Fixed bug in :meth:`DataFrame.resample` where bin edges were not correct for :class:`~pandas.tseries.offsets.BusinessDay` (:issue:`55281`)
-
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ def interpolate(
limit,
limit_direction,
limit_area,
fill_value,
copy: bool,
fill_value=None,
copy: bool = True,
**kwargs,
) -> Self:
"""
Expand Down
6 changes: 6 additions & 0 deletions pandas/tests/frame/methods/test_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,9 @@ def test_interpolate_empty_df(self):
result = df.interpolate(inplace=True)
assert result is None
tm.assert_frame_equal(df, expected)

def test_interpolate_ea_raise(self):
# GH#55347
df = DataFrame({"a": [1, None, 2]}, dtype="Int64")
with pytest.raises(NotImplementedError, match="does not implement"):
df.interpolate()

0 comments on commit 9320144

Please sign in to comment.