'''
More data cleaning and processing

It's now time to deal with the missing data. There are several strategies for 
this: You can drop them, fill them in using the mean of the column or row that the 
missing value is in (also known as imputation), or, if you are dealing with time 
series data, use a forward fill or backward fill, in which you replace missing 
values in a column with the most recent known value in the column. See pandas 
Foundations for more on forward fill and backward fill.

In general, it is not the best idea to drop missing values, because in doing so you 
may end up throwing away useful information. In this data, the missing values refer 
to years where no estimate for life expectancy is available for a given country. 
You could fill in, or guess what these life expectancies could be by looking at the
average life expectancies for other countries in that year, for example. Whichever 
strategy you go with, it is important to carefully consider all options and 
understand how they will affect your data.

In this exercise, you'll practice dropping missing values. Your job is to drop all 
the rows that have NaN in the life_expectancy column. Before doing so, it would be 
valuable to use assert statements to confirm that year and country do not have any 
missing values.

Begin by printing the shape of gapminder in the IPython Shell prior to dropping the
missing values. Complete the exercise to find out what its shape will be after
dropping the missing values!

INSTRUCTIONS
100 XP
Assert that country and year do not contain any missing values. The first assert 
statement has been written for you. Note the chaining of the .all() method to 
pd.notnull() to confirm that all values in the column are not null.
Drop the rows in the data where any observation in life_expectancy is missing. 
As you confirmed that country and year don't have missing values, you can use 
the .dropna() method on the entire gapminder DataFrame, because any missing values 
would have to be in the life_expectancy column. The .dropna() method has the 
default keyword arguments axis=0 and how='any', which specify that rows with any 
missing values should be dropped.
Print the shape of gapminder.
'''
