Skip to content

Commit 82d03b7

Browse files
committed
fix: Fixes wrong test case assumption when using linear interpolation on irregular index (test case pandas.tests.series.methods.test_interpolate.TestSeriesInterpolateData.test_nan_irregular_index).
1 parent 0293d8e commit 82d03b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tests/series/methods/test_interpolate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_nan_interpolate(self, kwargs):
271271
def test_nan_irregular_index(self):
272272
s = Series([1, 2, np.nan, 4], index=[1, 3, 5, 9])
273273
result = s.interpolate()
274-
expected = Series([1.0, 2.0, 3.0, 4.0], index=[1, 3, 5, 9])
274+
expected = Series([1.0, 2.0, 2.6666666666666665, 4.0], index=[1, 3, 5, 9])
275275
tm.assert_series_equal(result, expected)
276276

277277
def test_nan_str_index(self):

0 commit comments

Comments
 (0)