Issue
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.
Solution
df.loc[df['Artikelnr.'].isnull()]
Answered By - Panda Kim
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.