JuliaData / JuliaData/DelimitedFiles.jl
more consistently ignore whitespace in readdlm
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 20
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
readcsv(IOBuffer(" 1, 2,3")) gives [1.0 2.0 3.0], but readcsv(IOBuffer(" 1 , 2,3")) gives [" 1 ", 2.0, 3.0].
As another example, readcsv(IOBuffer("\"hello, again\",\"goodbye\"")) gives ["hello, again" "goodbye"], but readcsv(IOBuffer(" \"hello, again\",\"goodbye\"")) gives " \"hello" " again\"" "goodbye". And readcsv(IOBuffer("\"hello, again\" ,\"goodbye\"")) gives an error (unexpected character ' ' after quoted field at row 1 column 1).
It seems like it would be better to treat all of these cases the same, and ignore whitespace before and after the delimiter.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the readcsv and readdlm entry points named in the issue and reproduce the provided whitespace cases. Trace how whitespace around delimiters and quoted fields is parsed, then add or update tests so the examples are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100