# DataFrames: obtaining the subset of rows by a set of values

**URL:** https://discourse.julialang.org/t/dataframes-obtaining-the-subset-of-rows-by-a-set-of-values/15923
**Category:** New to Julia
**Tags:** dataframes
**Created:** [October 5, 2018, 1:14pm UTC](https://discourse.julialang.org/t/dataframes-obtaining-the-subset-of-rows-by-a-set-of-values/15923 "2018-10-05T13:14:50Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [October 6, 2018, 2:26am UTC](https://discourse.julialang.org/t/dataframes-obtaining-the-subset-of-rows-by-a-set-of-values/15923/12 "2018-10-06T02:26:15Z")

</div>

DataFramesMeta lets you do this:

```julia
@linq df |>
       where(:a .∈ Ref([1,2,5,7]))

```

Key thing here is the `Ref` for the broadcasted `in`. I suppose thats the most reasonable behavior but its a bit unexpected.

---

_[View the full topic](https://discourse.julialang.org/t/dataframes-obtaining-the-subset-of-rows-by-a-set-of-values/15923)._
