@@ -1347,6 +1347,7 @@ def test_interp_limit_area(self):
1347
1347
[np .nan , np .nan , 3.0 , 4.0 , np .nan , np .nan , 7.0 , np .nan , np .nan ]
1348
1348
)
1349
1349
result = s .interpolate (method = "linear" , limit_area = "inside" , limit = 1 )
1350
+ tm .assert_series_equal (result , expected )
1350
1351
1351
1352
expected = Series ([np .nan , np .nan , 3.0 , 4.0 , np .nan , 6.0 , 7.0 , np .nan , np .nan ])
1352
1353
result = s .interpolate (
@@ -1362,6 +1363,7 @@ def test_interp_limit_area(self):
1362
1363
[np .nan , np .nan , 3.0 , np .nan , np .nan , np .nan , 7.0 , 7.0 , np .nan ]
1363
1364
)
1364
1365
result = s .interpolate (method = "linear" , limit_area = "outside" , limit = 1 )
1366
+ tm .assert_series_equal (result , expected )
1365
1367
1366
1368
expected = Series ([np .nan , 3.0 , 3.0 , np .nan , np .nan , np .nan , 7.0 , 7.0 , np .nan ])
1367
1369
result = s .interpolate (
@@ -1371,8 +1373,9 @@ def test_interp_limit_area(self):
1371
1373
1372
1374
expected = Series ([3.0 , 3.0 , 3.0 , np .nan , np .nan , np .nan , 7.0 , np .nan , np .nan ])
1373
1375
result = s .interpolate (
1374
- method = "linear" , limit_area = "outside" , direction = "backward"
1376
+ method = "linear" , limit_area = "outside" , limit_direction = "backward"
1375
1377
)
1378
+ tm .assert_series_equal (result , expected )
1376
1379
1377
1380
# raises an error even if limit type is wrong.
1378
1381
msg = r"Invalid limit_area: expecting one of \['inside', 'outside'\], got abc"
0 commit comments