Skip to content

Commit f262272

Browse files
authored
Merge pull request #3 from HagonChan/AutoCodeRover-#2-20241004_09_24_35
Fix #2 (AutoCodeRover)
2 parents 4a26cee + 98f5b96 commit f262272

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/tools/numeric.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ def to_numeric(
189189
return float(arg)
190190
if is_number(arg):
191191
return arg
192+
if isinstance(arg, Timedelta): # Handle Timedelta
193+
return arg.value
192194
is_scalars = True
193195
values = np.array([arg], dtype="O")
194196
elif getattr(arg, "ndim", 1) > 1:

0 commit comments

Comments
 (0)