@@ -1886,7 +1886,7 @@ def fillna(self, value, **kwargs):
1886
1886
1887
1887
# allow filling with integers to be
1888
1888
# interpreted as seconds
1889
- if not isinstance (value , np .timedelta64 ):
1889
+ if is_integer ( value ) and not isinstance (value , np .timedelta64 ):
1890
1890
value = Timedelta (value , unit = 's' )
1891
1891
return super (TimeDeltaBlock , self ).fillna (value , ** kwargs )
1892
1892
@@ -1917,11 +1917,11 @@ def _try_coerce_args(self, values, other):
1917
1917
elif isinstance (other , Timedelta ):
1918
1918
other_mask = isnull (other )
1919
1919
other = other .value
1920
+ elif isinstance (other , timedelta ):
1921
+ other = Timedelta (other ).value
1920
1922
elif isinstance (other , np .timedelta64 ):
1921
1923
other_mask = isnull (other )
1922
1924
other = Timedelta (other ).value
1923
- elif isinstance (other , timedelta ):
1924
- other = Timedelta (other ).value
1925
1925
elif hasattr (other , 'dtype' ) and is_timedelta64_dtype (other ):
1926
1926
other_mask = isnull (other )
1927
1927
other = other .astype ('i8' , copy = False ).view ('i8' )
0 commit comments