# Show only rows with missing in one column

**URL:** <https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406>\
**Category:** New to Julia\
**Created:** [September 1, 2018, 2:34pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406 "2018-09-01T14:34:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Post date:** [September 1, 2018, 2:34pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406/1 "2018-09-01T14:34:31Z")

</div>

I can’t quite figure out how to subset a dataframe to only show rows with missing values in a certain column.

Take this example

```
df1 = DataFrame(B=[1,2,3],C=["x",missing,missing])

```

What is the syntax to get only the missing rows from df1?

---

<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:** [September 1, 2018, 3:40pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406/2 "2018-09-01T15:40:49Z")

</div>

Base DateaFrames Approach:

```julia
df1[ismissing.(df1[:C]), :]

```

DataFramesMeta approach

```julia
@where(df1, ismissing.(:C))

```

---

<div class="post-metadata">

**Author:** ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Post date:** [September 1, 2018, 3:44pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406/3 "2018-09-01T15:44:53Z")

</div>

Thanks! I expected this to be easy to find, but going through google and several of the docs, I couldn’t find this information. Did I miss this in the docs somewhere?

---

<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:** [September 1, 2018, 11:24pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406/4 "2018-09-01T23:24:51Z")

</div>

I think you are correct. The docs for DataFrames seem to be missing the fact that `df[BitArray, :]` produces a subset where the rows are only those for which the `Bitarray` takes a value of true.

You can post an issue if you want, otherwise I will and we can add a line in the docs.

---

<div class="post-metadata">

**Author:** ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Post date:** [September 1, 2018, 11:26pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406/5 "2018-09-01T23:26:34Z")

</div>

I’m not familiar with the process for updating those docs, so please do so. Thanks.

---

<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:** [September 1, 2018, 11:27pm UTC](https://discourse.julialang.org/t/show-only-rows-with-missing-in-one-column/14406/6 "2018-09-01T23:27:54Z")

</div>

Great! For next time, for all julia packages, the documentation is included in the git repo of the package itself, so getting an update to the docs is as simple as posting an issue there.
