Panda's data frame filtering on rows that are empty

Question:

With Jupyter Notebook and Panda’s I’m trying to filter ‘NaN’ values from a column in a dataframe.
I have uses the code you can see below.
empty_art = df.loc[df['Artikelnr.'] == 'NaN']

This does work when I am filtering for other values that are not empty.
For example leeg_art = df.loc[df['Artikelnr.'] == 'X99999'] works perfect.
I have tried the isnull() function as well but it doesn’t seem to be working either.
I must be making some mistake in the syntax, I just started with programming and Pandas so it’s probably something silly.

I expected to see a data frame with the empty columns of artikelnr.

Asked By: Neuquert

||

Answers:

df.loc[df['Artikelnr.'].isnull()]
Answered By: Panda Kim