Skip to content

Commit

Permalink
BUG: interpolate raising wrong error for ea (#55347)
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl authored Oct 3, 2023
1 parent 7df4211 commit f196319
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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 @@ -24,6 +24,7 @@ Bug fixes
~~~~~~~~~
- Fixed bug in :meth:`Categorical.equals` if other has arrow backed string dtype (:issue:`55364`)
- Fixed bug in :meth:`DataFrame.idxmin` and :meth:`DataFrame.idxmax` raising for arrow dtypes (:issue:`55368`)
- 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`)
- Silence ``Period[B]`` warnings introduced by :issue:`53446` during normal plotting activity (:issue:`55138`)
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ def interpolate(
limit,
limit_direction,
limit_area,
fill_value,
copy: bool,
**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 f196319

Please sign in to comment.