File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1019,15 +1019,18 @@ class Timedelta(_Timedelta):
1019
1019
value = parse_iso_format_string(value)
1020
1020
else :
1021
1021
try :
1022
+ orig_value = value
1022
1023
value = float (value)
1023
1024
except ValueError :
1024
1025
if unit is not None :
1025
- raise ValueError (" Unit cannot be defined for strings other than pure integer/floats." )
1026
+ raise ValueError (" Unit cannot be defined for strings other than pure integer/floats."
1027
+ " Value: {} Unit: {}" .format(value, unit))
1026
1028
value = parse_timedelta_string(value)
1027
1029
value = np.timedelta64(value)
1028
1030
else :
1029
1031
if unit is None :
1030
- raise ValueError (" Cannot convert float string without unit." )
1032
+ raise ValueError (" Cannot convert float string without unit."
1033
+ " Value: {} Type: {}" .format(orig_value, type (orig_value)))
1031
1034
value = convert_to_timedelta64(value, unit)
1032
1035
elif PyDelta_Check(value):
1033
1036
value = convert_to_timedelta64(value, ' ns' )
You can’t perform that action at this time.
0 commit comments