[
https://issues.apache.org/jira/browse/ARROW-15665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17507175#comment-17507175
]
Rok Mihevc commented on ARROW-15665:
------------------------------------
I think 1. and 2. would both cause parsing error. 3. is getting into inference
territory (see ARROW-15666).
Python stdlib strptime just throws errors AFAIK and pandas has it's own
[pd.to_datetime|https://pandas.pydata.org/docs/reference/api/pandas.to_datetime.html]
that has tons of options and you can play with this [example
here|https://trinket.io/python3/05e3976295].
Strptime format is notoriously non-standardized so we probably just want to
adopt c++ stdlib behaviour.
> [C++] Add error handling option to StrptimeOptions
> --------------------------------------------------
>
> Key: ARROW-15665
> URL: https://issues.apache.org/jira/browse/ARROW-15665
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Rok Mihevc
> Assignee: Rok Mihevc
> Priority: Major
> Labels: kernel, pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> We want to have an option to either raise, ignore or return NA in case of
> format mismatch.
> See
> [pandas.to_datetime|https://pandas.pydata.org/docs/reference/api/pandas.to_datetime.html]
> and lubridate
> [parse_date_time|https://lubridate.tidyverse.org/reference/parse_date_time.html]
> for examples.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)