DataFrame的问题:ERROR: MethodError: no method matching setindex!(::DataFrame, ::Array{Float64,2}, ::Symbol)

学习DataFrame时,遇到一个问题,搜索之后没找到解决办法,求大佬帮助!
using DataFrames
df = DataFrame()
df[:A] = 1:8
出现以下错误:
ERROR: MethodError: no method matching setindex!(::DataFrame, ::Array{Float64,2}, ::Symbol)
Closest candidates are:
setindex!(::DataFrame, ::Union{Tuple, AbstractArray}, ::Integer, ::AbstractArray{T,1} where T) at C:\Users\A.julia\packages\DataFrames\X0xNW\src\dataframe\dataframe.jl:569
setindex!(::DataFrame, ::Union{Tuple, AbstractArray}, ::Integer, ::Regex) at C:\Users\A.julia\packages\DataFrames\X0xNW\src\dataframe\dataframe.jl:569
setindex!(::DataFrame, ::Union{Tuple, AbstractArray}, ::Integer, ::InvertedIndex) at C:\Users\A.julia\packages\DataFrames\X0xNW\src\dataframe\dataframe.jl:569

Stacktrace:
[1] top-level scope at REPL[6]:1

df[!, :a]

谢谢大佬,能运行了!!!

京ICP备17009874号-2