Given a (2d) array A
how to export it into a CSV file with Julia?
Back in the older versions, I would write
writecsv( "FileName.csv", A);
which would dump the array A into the given file. This, however, does not work in version >= 1.0. After some googling, I also tried to use the CSV module doing
f = open("test.csv", "a+");
CSV.write(f, A; delim = ',')
but this throws an error
ERROR: ArgumentError: no default `Tables.rows` implementation for type: Array{Int64,2}
(my array A was of type Int64).
Does anyone have a working solution for this most trivial question?
:auto
argument, as inDataFrame(A, :auto)
. Bogumił, is this the newer practice? Thanks. Quote: "DataFrame
constructor from aMatrix
requires passing :auto as a second argument to automatically generate column names:DataFrame(matrix, :auto)
" – Along