Skip to content

Commit 15cef2c

Browse files
authored
CLN: remove unreachable, unnecessary axis kwd (#53991)
1 parent 609047b commit 15cef2c

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

pandas/core/generic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8052,10 +8052,8 @@ def interpolate(
80528052
)
80538053
else:
80548054
index = missing.get_interp_index(method, obj.index)
8055-
axis = self._info_axis_number
80568055
new_data = obj._mgr.interpolate(
80578056
method=method,
8058-
axis=axis,
80598057
index=index,
80608058
limit=limit,
80618059
limit_direction=limit_direction,

pandas/core/internals/blocks.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,6 @@ def interpolate(
13961396
self,
13971397
*,
13981398
method: InterpolateOptions,
1399-
axis: AxisInt,
14001399
index: Index,
14011400
inplace: bool = False,
14021401
limit: int | None = None,
@@ -1427,27 +1426,12 @@ def interpolate(
14271426
return [self.copy(deep=False)]
14281427
return [self] if inplace else [self.copy()]
14291428

1430-
if self.is_object and self.ndim == 2 and self.shape[0] != 1 and axis == 0:
1431-
# split improves performance in ndarray.copy()
1432-
return self.split_and_operate(
1433-
type(self).interpolate,
1434-
method=method,
1435-
axis=axis,
1436-
index=index,
1437-
inplace=inplace,
1438-
limit=limit,
1439-
limit_direction=limit_direction,
1440-
limit_area=limit_area,
1441-
downcast=downcast,
1442-
**kwargs,
1443-
)
1444-
14451429
copy, refs = self._get_refs_and_copy(using_cow, inplace)
14461430

14471431
# Dispatch to the EA method.
14481432
new_values = self.array_values.interpolate(
14491433
method=method,
1450-
axis=axis,
1434+
axis=self.ndim - 1,
14511435
index=index,
14521436
limit=limit,
14531437
limit_direction=limit_direction,

0 commit comments

Comments
 (0)