Skip to content

Commit 36a89ca

Browse files
authored
Remove downcast argument from resample.interpolate (#62866)
1 parent 125a9b7 commit 36a89ca

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

pandas/core/resample.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,6 @@ def interpolate(
850850
inplace: bool = False,
851851
limit_direction: Literal["forward", "backward", "both"] = "forward",
852852
limit_area=None,
853-
downcast=lib.no_default,
854853
**kwargs,
855854
):
856855
"""
@@ -907,11 +906,6 @@ def interpolate(
907906
(interpolate).
908907
* 'outside': Only fill NaNs outside valid values (extrapolate).
909908
910-
downcast : optional, 'infer' or None, defaults to None
911-
Downcast dtypes if possible.
912-
913-
.. deprecated:: 2.1.0
914-
915909
**kwargs : optional
916910
Keyword arguments to pass on to the interpolating function.
917911
@@ -993,7 +987,6 @@ def interpolate(
993987
Note that the series correctly decreases between two anchors
994988
``07:00:00`` and ``07:00:02``.
995989
"""
996-
assert downcast is lib.no_default # just checking coverage
997990
result = self._upsample("asfreq")
998991

999992
# If the original data has timestamps which are not aligned with the
@@ -1030,7 +1023,6 @@ def interpolate(
10301023
inplace=inplace,
10311024
limit_direction=limit_direction,
10321025
limit_area=limit_area,
1033-
downcast=downcast,
10341026
**kwargs,
10351027
)
10361028

pandas/tests/copy_view/test_interp_fillna.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def test_interpolate_object_convert_copies():
134134
arr_a = get_array(df, "a")
135135
msg = "Can not interpolate with method=pad"
136136
with pytest.raises(ValueError, match=msg):
137-
df.interpolate(method="pad", inplace=True, downcast="infer")
137+
df.interpolate(method="pad", inplace=True)
138138

139139
assert df._mgr._has_no_reference(0)
140140
assert np.shares_memory(arr_a, get_array(df, "a"))
@@ -148,7 +148,7 @@ def test_interpolate_downcast_reference_triggers_copy():
148148

149149
msg = "Can not interpolate with method=pad"
150150
with pytest.raises(ValueError, match=msg):
151-
df.interpolate(method="pad", inplace=True, downcast="infer")
151+
df.interpolate(method="pad", inplace=True)
152152
assert df._mgr._has_no_reference(0)
153153
assert not np.shares_memory(arr_a, get_array(df, "a"))
154154

0 commit comments

Comments
 (0)