I have a semicolon-separated csv file that has millions of rows of data. I want to use arrow
to read it faster, but arrow doesn't provide a function like readr::read_csv2
or read.csv2
in base. How can I read a semicolon-separated csv file using arrow's implementation for R?
Asked
Active
Viewed 36 times
1

Bastián Olea Herrera
- 454
- 4
- 14
-
1`arrow::read_delim_arrow("your/path", delim = ";")` – alistaire Jun 30 '23 at 23:05
1 Answers
3
In order to read a csv file that's separated by semicolons using the arrow package, use the argument parse_options = CsvParseOptions$create(delimiter = ";")
inside your reading function, like this:
library(arrow)
data <- arrow::read_csv_arrow("data/AtencionesUrgencia2022.csv",
parse_options = CsvParseOptions$create(delimiter = ";"))

Bastián Olea Herrera
- 454
- 4
- 14