Skip to content

BUG: to_timedelta(pd.NA) raising ValueError #52909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
lukemanley opened this issue Apr 25, 2023 · 1 comment
Closed
3 tasks done

BUG: to_timedelta(pd.NA) raising ValueError #52909

lukemanley opened this issue Apr 25, 2023 · 1 comment
Assignees
Labels
Bug Timedelta Timedelta data type

Comments

@lukemanley
Copy link
Member

Pandas version checks

  • I have checked that this issue has not already been reported.

  • 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

import pandas as pd

pd.to_datetime(pd.NA)   # -> NaT
pd.to_timedelta(pd.NA)  # -> ValueError: Value must be Timedelta, string, integer, float, timedelta or convertible, not NAType

Issue Description

to_timedelta(pd.NA) raising ValueError.

Expected Behavior

to_timedelta(pd.NA) should return NaT similar to to_datetime(pd.NA).

Installed Versions

.

@lukemanley lukemanley added Bug Timedelta Timedelta data type Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 25, 2023
@MarcoGorelli MarcoGorelli removed the Needs Triage Issue that has not been reviewed by a pandas team member label Apr 25, 2023
@DeaMariaLeon
Copy link
Member

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timedelta Timedelta data type
Projects
None yet
Development

No branches or pull requests

3 participants