thisisnic commented on issue #37134:
URL: https://github.com/apache/arrow/issues/37134#issuecomment-1679156244
Hi @ar-puuk, thanks for the feature request! There are no Arrow C++ options
we could map this to, though I will add the C++ label to this and consider it a
feature request for that library.
As a workaround, would it work to use `stringr::str_trim()` on your data
after you've read it in?
``` r
library(arrow)
library(dplyr)
tf <- tempfile()
con <- file(tf)
writeLines("x,y\n value1, value2 ", con)
close(con)
# the whitespace remains
read_csv_arrow(tf)
#> # A tibble: 1 × 2
#> x y
#> <chr> <chr>
#> 1 " value1" " value2 "
# whitespace is gone
read_csv_arrow(tf) |>
mutate(across(c(x, y), stringr::str_trim))
#> # A tibble: 1 × 2
#> x y
#> <chr> <chr>
#> 1 value1 value2
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]