- To get a count of the missing values, the isnull method must first be called to change each DataFrame value to a boolean. Let's call this method on the movie dataset:
>>> movie = pd.read_csv('data/movie.csv')>>> movie.isnull().head()
- We will chain the sum method that interprets True/False booleans as 1/0. Notice that a Series is returned:
>>> movie.isnull().sum().head()color 19
director_name 102
num_critic_for_reviews 49
duration 15
director_facebook_likes 102
dtype: int64
- We can go one step further and take the sum of this Series and return the count of the total number of missing values in the entire DataFrame as a scalar ...