even if I put the parentheses I still get the same error, like I said I know how to use it if we don4t have a function but in this case where I have a function I really don’t get it:
you can see here :
julia> using CSV
julia> function mar(x,y)
for i in 1:10
s=x*i+y
end
CSV.write("out.csv",(s = s, x =fill(x, 10), y = fill(y, 10)))
end
mar (generic function with 1 method)
julia> CSV.read("out.csv")
┌ Warning: `CSV.read(input; kw...)` is deprecated in favor of `CSV.read(input, DataFrame; kw...)
└ @ CSV C:\Users\Administrator\.julia\packages\CSV\vohbW\src\CSV.jl:41
ERROR: ArgumentError: "out.csv" is not a valid file
Stacktrace:
[1] CSV.Header(::String, ::Int64, ::Bool, ::Int64, ::Nothing, ::Int64, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Nothing, ::Nothing, ::Array{String,1}, ::String, ::Nothing, ::Bool, ::Char, ::Nothing, ::Nothing, ::Char, ::Nothing, ::Nothing, ::UInt8, ::Array{String,1}, ::Array{String,1}, ::Nothing, ::Nothing, ::Dict{Type,Type}, ::Nothing, ::Float64, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at C:\Users\Administrator\.julia\packages\CSV\vohbW\src\header.jl:92
[2] #File#26(::Int64, ::Bool, ::Int64, ::Nothing, ::Int64, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Nothing, ::Nothing, ::Array{String,1}, ::String, ::Nothing, ::Bool, ::Char, ::Nothing, ::Nothing, ::Char, ::Nothing, ::Nothing, ::UInt8, ::Array{String,1}, ::Array{String,1}, ::Nothing, ::Nothing, ::Dict{Type,Type}, ::Nothing, ::Float64, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Type{CSV.File}, ::String) at C:\Users\Administrator\.julia\packages\CSV\vohbW\src\file.jl:216
[3] CSV.File(::String) at C:\Users\Administrator\.julia\packages\CSV\vohbW\src\file.jl:216
[4] #read#75(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(CSV.read), ::String, ::Nothing) at C:\Users\Administrator\.julia\packages\CSV\vohbW\src\CSV.jl:44
[5] read at C:\Users\Administrator\.julia\packages\CSV\vohbW\src\CSV.jl:40 [inlined] (repeats 2 times)
[6] top-level scope at REPL[45]:1
I don’t know what i’m still missing