Skip to content

Commit 822f55e

Browse files
committed
added test case for change
1 parent d87273d commit 822f55e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/series/test_missing.py

+9
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,15 @@ def test_spline_error(self):
891891
with tm.assertRaises(ValueError):
892892
s.interpolate(method='spline', order=0)
893893

894+
def test_interp_timedelta64(self):
895+
# GH 14799
896+
tm._skip_if_no_scipy()
897+
df = Series([1, np.nan, 3], index=pd.to_datetime([1, 2, 3], unit="d"))
898+
result = df.interpolate(method='time')
899+
expected = Series([1., 2., 3.],
900+
index=pd.to_datetime([1, 2, 3], unit="d"))
901+
assert_series_equal(result, expected)
902+
894903

895904
if __name__ == '__main__':
896905
import nose

0 commit comments

Comments
 (0)