# Error in selecting column dataframe with Julia 1.2

**URL:** <https://discourse.julialang.org/t/error-in-selecting-column-dataframe-with-julia-1-2/28208>\
**Category:** New to Julia\
**Created:** [August 30, 2019, 1:15pm UTC](https://discourse.julialang.org/t/error-in-selecting-column-dataframe-with-julia-1-2/28208 "2019-08-30T13:15:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Post date:** [August 30, 2019, 1:15pm UTC](https://discourse.julialang.org/t/error-in-selecting-column-dataframe-with-julia-1-2/28208/1 "2019-08-30T13:15:53Z")

</div>

Hello,  
I have been using this formula to get a value of a given dataframe’s column:

```julia
julia> println(df[(df[:Parameter] .== "dilution"), :5][1]
       )
┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
│ caller = top-level scope at none:0
└ @ Core none:0
1/h

```

It was working good (and still it works) but now that I have Julia 1.2 I get these warnings.  
What is the syntax for this command now?  
I tried with these:

```julia
julia> df[!, :Parameter] .== "burst"
19-element BitArray{1}:
 1
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0

julia> df[!, :Parameter] .== "burst", :5
(Bool[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 5)

julia> df[!, :Parameter] .== "burst", :5[1]
(Bool[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 5)

```

but I am obviously doing it wrong. Thanks

---

<div class="post-metadata">

**Author:** ![Rudi79](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rudi79/32/3884_2.png) [@Rudi79](https://discourse.julialang.org/u/Rudi79)\
**Post date:** [August 30, 2019, 2:53pm UTC](https://discourse.julialang.org/t/error-in-selecting-column-dataframe-with-julia-1-2/28208/2 "2019-08-30T14:53:34Z")

</div>

Try

```julia
println(df[(df[!, :Parameter] .== "dilution"), :5][1])

```

or

```julia
println(df[(df.Parameter .== "dilution"), :5][1])

```

note that the paranthesis are not needed in case you have just one logical condition. So this works too

```julia
println(df[df.Parameter .== "dilution", :5][1])

```

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [August 30, 2019, 2:56pm UTC](https://discourse.julialang.org/t/error-in-selecting-column-dataframe-with-julia-1-2/28208/3 "2019-08-30T14:56:20Z")

</div>

> [@Rudi79](#):
>
> df.Parameter .== “dilution”

Exactly - the `getproperty` approach is typically preferred. The `!` syntax is OK, to be used, but it was originally intended for cases when you are not able to get a clean access using `getproperty`.

---

<div class="post-metadata">

**Author:** ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Post date:** [August 31, 2019, 1:26pm UTC](https://discourse.julialang.org/t/error-in-selecting-column-dataframe-with-julia-1-2/28208/4 "2019-08-31T13:26:42Z")

</div>

Hi, I have another issue: with the `df.Parameter` syntax, the variables are extracted as characters. Is that normal? how can I avoid it?
