Issue
I'm using Pandas to explore some datasets. I have this dataframe:
I want to exclude any row that has a value in column City
. So I've tried:
new_df = all_df[(all_df["City"] == "None") ]
new_df
But then I got an empty dataframe:
It works whenever I use any value other than None
. Any idea how to filter this dataframe?
Solution
Consider using isnull()
to locate missing values
all_df[all_df['City'].isnull()]
Answered By - tarashypka
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.