# How to handle a DataFrame deprecation of \`&\` in v0.6

**URL:** <https://discourse.julialang.org/t/how-to-handle-a-dataframe-deprecation-of-in-v0-6/4787>\
**Category:** General Usage\
**Created:** [July 11, 2017, 10:13am UTC](https://discourse.julialang.org/t/how-to-handle-a-dataframe-deprecation-of-in-v0-6/4787 "2017-07-11T10:13:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 11, 2017, 10:13am UTC](https://discourse.julialang.org/t/how-to-handle-a-dataframe-deprecation-of-in-v0-6/4787/1 "2017-07-11T10:13:23Z")

</div>

In v0.5 I did this:

```julia
using DataFrames
df = DataFrame(A = rand(5), 
        B = rand(1:10, 5), 
        C = ["a", "e", "i", "o", "u"])
df[(df[:A] .> 0.2) & (df[:B] .< 3), :] 

1×3 DataFrames.DataFrame
│ Row │ A │ B │ C │
├─────┼──────────┼───┼─────┤
│ 1 │ 0.386271 │ 1 │ "e" │

(Seems to work...)

```

In v0.6 I now get a deprecation warning:

```julia
WARNING: a::DataArray{$(Expr(:<:, :Integer))} & b::DataArray{$(Expr(:<:, :Integer))} 
is deprecated, use &.(a, b) instead.

```

But I can’t work out how to rephrase the expression to make it work…

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 11, 2017, 10:16am UTC](https://discourse.julialang.org/t/how-to-handle-a-dataframe-deprecation-of-in-v0-6/4787/2 "2017-07-11T10:16:40Z")

</div>

Just put a dot `.` in front of the `&` to broadcast it over all the elements:

```julia
df[(df[:A] .> 0.2) .& (df[:B] .< 3), :] 

```

works on my system on julia 0.6.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 11, 2017, 10:34am UTC](https://discourse.julialang.org/t/how-to-handle-a-dataframe-deprecation-of-in-v0-6/4787/3 "2017-07-11T10:34:23Z")

</div>

Thanks! I didn’t try that one… 🙂
