# ArgumentError y = \[y;df\[:,Symbol(v)\]\]

**URL:** <https://discourse.julialang.org/t/argumenterror-y-y-df-symbol-v/38198>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 25, 2020, 4:04pm UTC](https://discourse.julialang.org/t/argumenterror-y-y-df-symbol-v/38198 "2020-04-25T16:04:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bujun\_mei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bujun_mei/32/14321_2.png) [@bujun\_mei](https://discourse.julialang.org/u/bujun_mei)\
**Post date:** [April 25, 2020, 4:04pm UTC](https://discourse.julialang.org/t/argumenterror-y-y-df-symbol-v/38198/1 "2020-04-25T16:04:37Z")

</div>

y = Array{Float64,1}()  
print(mme.depVarVec)  
for v in mme.depVarVec  
y = [y;df[:,Symbol(v)]]  
end  
output:  
AbstractString[“y1”, “y2”]  
ArgumentError: column name :y1 not found in the data frame; existing most similar names are: :y

Stacktrace:  
[1] lookupname at C:\Users\wangzhihua.julia\packages\DataFrames\S3ZFo\src\other\index.jl:253 [inlined]  
[2] getindex at C:\Users\wangzhihua.julia\packages\DataFrames\S3ZFo\src\other\index.jl:259 [inlined]  
[3] getindex(::DataFrame, ::Colon, ::Symbol) at C:\Users\wangzhihua.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:346  
[4] top-level scope at .\In[84]:22  
Why? Thank you.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 25, 2020, 7:25pm UTC](https://discourse.julialang.org/t/argumenterror-y-y-df-symbol-v/38198/2 "2020-04-25T19:25:29Z")

</div>

Please, follow [our best practices when asking for help](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757).

The error seems to be self-explanatory, you are trying to access a column named `:y1` in a dataframe, but it does not have a column with such name, the column with the most similar name is `:y`. Should your dataframe have a column named `:y1`? It is impossible to me to say without a Minimal Working Example (MWE). Also, are you trying to get a vector or a single value from the dataframe? (the syntax `[a; b]` allows `a` and `b` be either elements or vectors).
