Skip to content

Inconsitent behaviour of writedlm with option header=true #25

Open
@mauro3

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions