0

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.

Neuquert
  • 59
  • 7

1 Answers1

1
df.loc[df['Artikelnr.'].isnull()]
Panda Kim
  • 6,246
  • 2
  • 12