You can do this with a function writedlmif you convert your DataFrame to an array:
using DataFrames
A = DataFrame(rand(3,3));
B = convert(Array, A);
writedlm("/path/to/file.txt", B, ", ")
To include a header, you can use something like this:
f = open("/path/to/file.txt", "w")
writedlm(f, names(A)', ", ")
writedlm(f, B, ", ")
close(f)
Note1: do not forget the transpose operation 'onnames(A)'
Note2: Rather, I believe that it writedlmwill have an option header_string. See here .
source
share