JuliaData / DelimitedFiles.jl

A package for reading and writing files with delimited values (Originally a Julia stdlib)
MIT License
18 stars 2 forks source link

Inconsitent behaviour of `writedlm` with option `header=true` #25

Open mauro3 opened 1 year ago

mauro3 commented 1 year ago

I expected that

writedlm("../products/mb@2500.csv", (rand(3,6), ["one" "two" "three"]), header=true)

would write a csv with header line one two three. Instead it writes a two line csv with rand(3,6)[:] as first and one two three as second line (i.e. being compatible with what readdlm does with the header option set).

Maybe the easiest fix would be to just change writedlm to only allow the quotes options, which seems to be the only one actually doing anything: https://github.com/JuliaData/DelimitedFiles.jl/blob/db79c842f95f55b1f8d8037c0d3363ab21cd3b90/src/DelimitedFiles.jl#L781-L786