Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (50.2k points)

I'm using Pandas to explore some datasets. I have this dataframe:

enter image description here

I want to exclude any row that has a city value. So I've tried:

new_df = all_df[(all_df["City"] == "None") ] new_df

But then I got an empty dataframe:

enter image description here

It works whenever I use any value other than None. Any idea of how to filter this dataframe?

1 Answer

0 votes
by (108k points)

You can just consider using isnull() to place the missing values

all_df[all_df['City'].isnull()]

Browse Categories

...