browser_index = ['Firefox', 'Chrome', 'Safari', 'IE10', 'Konqueror']

browser_df = pd.DataFrame({
      'http_status': [200,200,404,404,301],
      'response_time': [0.04, 0.02, 0.07, 0.08, 1.0]},
       index=browser_index)
browser_df

"""
Explanation: Missing Data
pandas uses np.nan to represent missing data. By default, it is not included in computations.
documentation: http://pandas.pydata.org/pandas-docs/stable/missing_data.html#missing-data
reindex()
documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.reindex.html
End of explanation
"""


new_index= ['Safari', 'Iceweasel', 'Comodo Dragon', 'IE10', 'Chrome']
browser_df_2 = browser_df.reindex(new_index)
browser_df_2

"""
Explanation: reindex() creates a copy (not a view)
End of explanation
"""


browser_df_3 = browser_df_2.dropna(how='any')
browser_df_3

"""
Explanation: drop rows that have missing data
documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.dropna.html
End of explanation
"""


browser_df_2.fillna(value=-0.05555)

"""
Explanation: fill-in missing data
documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.fillna.html
End of explanation
"""


pd.isnull(browser_df_2)

"""
Explanation: get boolean mask where values are nan
End of explanation
"""


browser_df_2 * 17

"""
Explanation: NaN propagates during arithmetic operations
End of explanation
"""


