# Finding values and deleting rows in a DataFrame

**URL:** <https://discourse.julialang.org/t/finding-values-and-deleting-rows-in-a-dataframe/52653>\
**Category:** General Usage\
**Created:** [December 31, 2020, 10:39am UTC](https://discourse.julialang.org/t/finding-values-and-deleting-rows-in-a-dataframe/52653 "2020-12-31T10:39:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FDon](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@FDon](https://discourse.julialang.org/u/FDon)\
**Post date:** [December 31, 2020, 10:39am UTC](https://discourse.julialang.org/t/finding-values-and-deleting-rows-in-a-dataframe/52653/1 "2020-12-31T10:39:24Z")

</div>

I’m new to this place, as I am currently taking an introduction course to Julia at university. I am having trouble regarding our take home assignement and hope that you guys can help me out a bit.  
So here’s the question: I have a 497x6 DataFrame in which NaN shows up two times. What I have to do now is:

- Counting the NaN values (answer should be 2)
- FInding out in which row the values occur
- Exclude those rows from the DataFrame

I am new to DataFrames and Google did not help me too much. Are any of you guys able to help? Thank you in advance!

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 31, 2020, 11:32am UTC](https://discourse.julialang.org/t/finding-values-and-deleting-rows-in-a-dataframe/52653/2 "2020-12-31T11:32:53Z")

</div>

Seeing as this is a homework assignment, I won’t directly answer your question, except to say that all of these problems can be solved by application of Julia base functionality. Functions that might be of interest to you include `isnan` and `findall`.

You should probably also read through the [DataFrames tutorial](https://github.com/bkamins/Julia-DataFrames-Tutorial) to understand how row and column selection works.

---

<div class="post-metadata">

**Author:** ![FDon](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@FDon](https://discourse.julialang.org/u/FDon)\
**Post date:** [December 31, 2020, 1:45pm UTC](https://discourse.julialang.org/t/finding-values-and-deleting-rows-in-a-dataframe/52653/3 "2020-12-31T13:45:30Z")

</div>

Thank you very much Nils. With isnan and findall and some moree googling, i was able to get a hold of the tasks. I should be able to finish now.
