Open sfc-gh-mvashishtha opened 2 hours ago
Thanks for the report, confirmed on main. With a Series, to_numeric
has logic for NumPy dtypes "mM"
to handle this case, but there is no corresponding logic for scalars. Further investigations and PRs to fix are welcome!
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Getting a
TypeError
Expected Behavior
For the example above, I should get the integer
1
. That would match the behavior ofpd.to_numeric(pd.Series(pd.Timedelta(1)))
Installed Versions