I have been trying for several days to save a dataframe and cannot seem to avoid the same recurring error.
Here is the beginning of my file:
df_rtns6[1:5,1:5]
Date AAPL_Close ABT_Close ADBE_Close AIG_Close
String Float64 Float64 Float64 Float64
1 2000-01-04 -0.08431 -0.0285714 -0.0838894 -0.0511125
2 2000-01-05 0.0146332 -0.00183822 0.0197711 0.00237643
3 2000-01-06 -0.0865383 0.0349907 0.00816327 0.0305042
4 2000-01-07 0.0473689 0.0106762 0.048583 0.0748466
5 2000-01-10 -0.0175879 -0.00704224 0.03861 -0.0176941
and here is my write statement
CSV.write("Rtns_FF_Factors.csv",df_rtns6);
The output is always something like:
UndefVarError: writeshortest not defined
Stacktrace:
[1] writecell(buf::Vector{UInt8}, pos::Int64, len::Int64, io::IOStream, x::Float64, opts::CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)})
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:444
[2] (::CSV.var"#106#107"{Vector{UInt8}, Base.RefValue{Int64}, Int64, IOStream, Int64, CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)}, UInt8, UInt8})(val::Float64, col::Int64, nm::Symbol)
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:371
[3] eachcolumn
@ ~/.julia/packages/Tables/T7rHm/src/utils.jl:70 [inlined]
[4] writerow(buf::Vector{UInt8}, pos::Base.RefValue{Int64}, len::Int64, io::IOStream, sch::Tables.Schema{(:Date, :AAPL_Close, :ABT_Close, :ADBE_Close, :AIG_Close, :AMGN_Close, :AMT_Close, :AMZN_Close, :AXP_Close, :BA_Close, :BAC_Close, :BK_Close, :BKNG_Close, :BLK_Close, :BMY_Close, :C_Close, :CAT_Close, :CL_Close, :CMCSA_Close, :COF_Close,
and similar, then a bit further down:
DataFrames.DataFrameRows{DataFrame}, CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)}, Vector{UInt8}, Int64, Int64, NTuple{85, Symbol}}, io::Any, append::Bool, compress::Bool)
I checked for βnothingsβ and missing values and there are none.
I would be grateful for any help