Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
When reading in data where commas have been used as decimal separators (e.g. 3,141 to indicate pi), the column is read in as a character string. If I try to specify a schema in R, i.e.:
# create table of values with decimal places
set.seed(1)
tbl <- tibble::tibble(x = rnorm(5))
# write to disk with comma separator
readr::write_csv2(tbl, "tst.csv")
# read back in
read_delim_arrow("tst.csv", delim = ";", schema = schema(x = float32()))
I get the following error:
Error: Invalid: In CSV column #0: CSV conversion error to float: invalid value 'x'
/home/nic2/arrow/cpp/src/arrow/csv/converter.cc:437 decoder_.Decode(data, size, quoted, &value)
/home/nic2/arrow/cpp/src/arrow/csv/parser.h:84 status
{{/home/nic2/arrow/cpp/src/arrow/csv/converter.cc:441 parser.VisitColumn(col_index, visit) }}
Please can we have the functionality to be able to read in data from this format as it's fairly common across a number of countries?
Attachments
Attachments
Issue Links
- links to