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