Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsitent behaviour of writedlm with option header=true #25

Open
mauro3 opened this issue Jun 2, 2023 · 0 comments
Open

Inconsitent behaviour of writedlm with option header=true #25

mauro3 opened this issue Jun 2, 2023 · 0 comments

Comments

@mauro3
Copy link

mauro3 commented Jun 2, 2023

I expected that

writedlm("../products/[email protected]", (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:

function writedlm(io::IO, itr, dlm; opts...)
optsd = val_opts(opts)
quotes = get(optsd, :quotes, true)
pb = PipeBuffer()
for row in itr
writedlm_row(pb, row, dlm, quotes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant