How to specify no quotes around strings in writedlm()


#1

I’m new to Julia and am trying to write an array to a .csv file on the hard drive so that the strings are not quoted. I don’t see that there is an argument in writedlm() to specify this. Here is the Python code that I’m trying to replicate:

# Python code
with open("output.csv", "w") as f:
    out = csv.writer(f, quoting = csv.QUOTE_NONE, quotechar = '', delimiter = '\n')
    out.writerow(all_output)

So far I’ve got this in Julia, but can’t figure out how to specify quoting options:

# Julia code, so far
writedlm("output.csv", all_output, '\n')

Thank you in advance for any guidance.


#2

I am surprised this isn’t documented. I had to take a look at the source code to figure out the available keyword options for writedlm. I haven’t tried it but you should try the quotes keyword.


#3

readdlm has extensive documentation, maybe writedlm should refer to that.

@ekbrown: perhaps you could consider submitting a PR about this, so that others would have an easier time finding these keywords.