我想生成一个空的数据帧数组,稍后将在代码中填充,但我还没有弄清楚如何去做。任何帮助,将不胜感激!
我尝试了一种定义空数组的标准方法。
julia> df = Array{DataFrame}(undef,10)
10-element Array{DataFrame,1}:
#undef
#undef
#undef
#undef
#undef
#undef
#undef
#undef
#undef
#undef
julia> println(typeof(df[1]))
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] getindex(::Array{DataFrame,1}, ::Int64) at ./array.jl:729
[2] top-level scope at none:0
我希望 typeof(df[1]) 说 DataFrame,但它失败并显示错误消息。