You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[R] read_csv_arrow()'s timestamp_parsers parameter is a bit light on documentation and doesn't appear to do anything #33708
I'm not sure how exactly it's supposed to work, but it appears not to do anything, and neither the docs nor error messages are enough to tell me what I'm supposed to be doing/seeing here.
In this example, the time column does not seem read as a timestamp type, so the timestamp_parsers option does nothing.
The behavior of this option can be verified by specifying the column type.
> read_csv_arrow(dst_file, col_types= schema(time=arrow::timestamp()), timestamp_parsers=list("%m-%d-%y"))
Error:!Invalid:InCSVcolumn#0: CSV conversion error to timestamp[s]: invalid value '2023-01-16 19:47:57'Run`rlang::last_error()`toseewheretheerroroccurred.
> read_csv_arrow(dst_file, col_types= schema(time=arrow::timestamp()), timestamp_parsers=list("%Y-%m-%d %H:%M:%S"))
# A data frame: 1 × 1time<dttm>12023-01-1619:47:57
> read_csv_arrow(dst_file, col_types= schema(time=arrow::timestamp()), timestamp_parsers=list("%m-%d-%y", TimestampParser$create()))
# A data frame: 1 × 1time<dttm>12023-01-1619:47:57
Regarding the ability to specify multiple parsers to fall back on, as in the last example, I was impressed to learn that pyarrow has this feature and it would be great to have examples in the R documentation.
changed the title [-][R] `read_csv_arrow()`'s `timestemp_parsers` parameter is a bit light on documentation and doesn't appear to do anything[/-][+][R] `read_csv_arrow()`'s `timestamp_parsers` parameter is a bit light on documentation and doesn't appear to do anything[/+]on Mar 2, 2023
Activity
eitsupi commentedon Feb 24, 2023
In this example, the
timecolumn does not seem read as a timestamp type, so thetimestamp_parsersoption does nothing.The behavior of this option can be verified by specifying the column type.
Regarding the ability to specify multiple parsers to fall back on, as in the last example, I was impressed to learn that pyarrow has this feature and it would be great to have examples in the R documentation.
[-][R] `read_csv_arrow()`'s `timestemp_parsers` parameter is a bit light on documentation and doesn't appear to do anything[/-][+][R] `read_csv_arrow()`'s `timestamp_parsers` parameter is a bit light on documentation and doesn't appear to do anything[/+]GH-33708: [R] read_csv_arrow()'s timestamp_parsers parameter is a bit…
thisisnic commentedon Sep 16, 2026
Issue resolved by pull request 51166
#51166
apacheGH-33708: [R] read_csv_arrow()'s timestamp_parsers parameter is…