File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -233,13 +233,12 @@ def pad_or_backfill(
233
233
self ,
234
234
* ,
235
235
method : FillnaOptions ,
236
- axis : int ,
237
236
limit : int | None ,
238
237
limit_area : Literal ["inside" , "outside" ] | None = None ,
239
238
copy : bool = True ,
240
239
) -> Self :
241
240
"""
242
- ffill or bfill
241
+ ffill or bfill along axis=0.
243
242
"""
244
243
if copy :
245
244
out_data = self ._ndarray .copy ()
@@ -250,7 +249,7 @@ def pad_or_backfill(
250
249
missing .pad_or_backfill_inplace (
251
250
out_data ,
252
251
method = meth ,
253
- axis = axis ,
252
+ axis = 0 ,
254
253
limit = limit ,
255
254
limit_area = limit_area ,
256
255
)
Original file line number Diff line number Diff line change @@ -1366,13 +1366,17 @@ def pad_or_backfill(
1366
1366
1367
1367
# Dispatch to the PandasArray method.
1368
1368
# We know self.array_values is a PandasArray bc EABlock overrides
1369
- new_values = cast (PandasArray , self .array_values ).pad_or_backfill (
1369
+ vals = cast (PandasArray , self .array_values )
1370
+ if axis == 1 :
1371
+ vals = vals .T
1372
+ new_values = vals .pad_or_backfill (
1370
1373
method = method ,
1371
- axis = axis ,
1372
1374
limit = limit ,
1373
1375
limit_area = limit_area ,
1374
1376
copy = copy ,
1375
1377
)
1378
+ if axis == 1 :
1379
+ new_values = new_values .T
1376
1380
1377
1381
data = extract_array (new_values , extract_numpy = True )
1378
1382
You can’t perform that action at this time.
0 commit comments