Skip to content

BUG: to_timedelta still raises with errors='ignore' #13613

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

From the added docs in #13425:

In [10]: pd.to_timedelta(['apple', '1 day'], errors='ignore')
...
ValueError: unit abbreviation w/o a number

In [12]: pd.to_timedelta(['apple', pd.Timedelta('1day')], errors='ignore')
...
ValueError: unit abbreviation w/o a number

It's the same error as you get with errors='raise' (so not captured somewhere), errors='coerce is working correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions