Skip to content

Commit d87273d

Browse files
committed
added timedelta as valid type for conversion to integer
1 parent 36bb8af commit d87273d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/missing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ def _interp_limit(invalid, fw_limit, bw_limit):
187187
if method in ('values', 'index'):
188188
inds = np.asarray(xvalues)
189189
# hack for DatetimeIndex, #1646
190-
if issubclass(inds.dtype.type, np.datetime64):
190+
if (issubclass(inds.dtype.type, np.datetime64) or
191+
issubclass(inds.dtype.type, np.timedelta64)):
191192
inds = inds.view(np.int64)
192193
if inds.dtype == np.object_:
193194
inds = lib.maybe_convert_objects(inds)

0 commit comments

Comments
 (0)