Skip to content

English ordinals are converted to datetime #9

@fmeyer

Description

@fmeyer

When dealing with regular english ordinal numbers, the library converts then to datetime.
ex:

list(strconv.convert_series(["20th", "street", "2015-01-01"]))

becomes:
[datetime.datetime(2017, 7, 20, 0, 0), 'street', datetime.datetime(2015, 1, 1, 0, 0)]

This is caused because duparse takes the ordinal as a literal date when the previous types aren't satisfied. Since unregistering the datetime converter affects the other fields on the series, the only solution I found is to define a new ordinal type.

So the question to discuss is if the default fallback value should be datetime because the same issue happens when the string contains a ratio like 2/3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions