We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93602ac commit 28ffc98Copy full SHA for 28ffc98
pandas/_libs/tslibs/timedeltas.pyx
@@ -1021,6 +1021,8 @@ class Timedelta(_Timedelta):
1021
try:
1022
value = float(value)
1023
except ValueError:
1024
+ if unit is not None:
1025
+ raise ValueError("Unit cannot be defined for strings other than pure integer/floats.")
1026
value = parse_timedelta_string(value)
1027
value = np.timedelta64(value)
1028
else:
0 commit comments