# Is there a dropna() for DataFrame?

**URL:** https://discourse.julialang.org/t/is-there-a-dropna-for-dataframe/1777
**Category:** Statistics
**Tags:** question
**Created:** [January 30, 2017, 3:17am UTC](https://discourse.julialang.org/t/is-there-a-dropna-for-dataframe/1777 "2017-01-30T03:17:05Z")
**Posts on this page:** 1
**Showing post:** 19

<div class="post-metadata">

### Author: ![mwsohn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mwsohn/32/2696_2.png) [@mwsohn](https://discourse.julialang.org/u/mwsohn)
#### Post date: [March 22, 2017, 1:41am UTC](https://discourse.julialang.org/t/is-there-a-dropna-for-dataframe/1777/19 "2017-03-22T01:41:33Z")

</div>

Is this what you want?

```julia
import DataFrames.dropna
function dropna(df::DataFrame,args::Symbol...)
    if length(args) == 0
        return df[completecases(df),:]
    end

    ba = BitArray(trues(size(df,1)))
    for sym in args
        ba &= ~BitArray(df[sym].na)
    end
    return df[ba,:]
end

```

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-dropna-for-dataframe/1777)._
