Home > Mobile >  How to find a single NaN row in my DataFrame
How to find a single NaN row in my DataFrame

Time:01-19

I have a DataFrame with a 259399 rows and one column. It is called hfreq. In one single row I have a NaN value and I want to find it. I thought this is easy and tried hfreq[hfreq.isnull()]. But as you can see it doesn't help:

enter image description here

What am I doing wrong and how is it done correctly?

Edit: For clarity: That is how my DataFrame looks like:

enter image description here

There is only one NaN value hidden somewhere in the middle and I want to learn where it is so I want to get its index.

CodePudding user response:

use the following code.

hfreq.loc[hfreq['value'].isnull()]
  • Related