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 @@ -1120,15 +1120,18 @@ class Timedelta(_Timedelta):
1120
1120
value = parse_iso_format_string(value)
1121
1121
else :
1122
1122
try :
1123
+ orig_value = value
1123
1124
value = float (value)
1124
1125
except ValueError :
1125
1126
if unit is not None :
1126
- raise ValueError (" Unit cannot be defined for strings other than pure integer/floats." )
1127
+ raise ValueError (" Unit cannot be defined for strings other than pure integer/floats."
1128
+ " Value: {} Unit: {}" .format(value, unit))
1127
1129
value = parse_timedelta_string(value)
1128
1130
value = np.timedelta64(value)
1129
1131
else :
1130
1132
if unit is None :
1131
- raise ValueError (" Cannot convert float string without unit." )
1133
+ raise ValueError (" Cannot convert float string without unit."
1134
+ " Value: {} Type: {}" .format(orig_value, type (orig_value)))
1132
1135
value = convert_to_timedelta64(value, unit)
1133
1136
elif PyDelta_Check(value):
1134
1137
value = convert_to_timedelta64(value, ' ns' )
You can’t perform that action at this time.
0 commit comments