<jupyter_start><jupyter_text>where does this come from?<jupyter_code>visited = pd.read_csv('../data/survey_visited.csv')
visited
# you can use the na_values with keep_default_na to manually specify missing
survey = pd.read_csv('../data/survey_survey.csv')

vs = visited.merge(survey, left_on='ident', right_on='taken')
vs<jupyter_output><empty_output><jupyter_text>count missing data<jupyter_code>ebola = pd.read_csv('../data/ebola_country_timeseries.csv')
ebola.info()
# sorts by frequency
# will not always be on top
ebola['Cases_Guinea'].value_counts(dropna=False).head()<jupyter_output><empty_output><jupyter_text>Recode missing<jupyter_code>ebola.head()
ebola.fillna(0).head()
ebola.fillna(method='ffill').head()
ebola.fillna(method='ffill').tail()
ebola.fillna(method='bfill').head()
ebola.fillna(method='bfill').tail()<jupyter_output><empty_output><jupyter_text>Calculations with missing<jupyter_code>ebola['Cases_Guinea'].sum()
ebola['Cases_Guinea'].sum(skipna=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1562189054726368, 'fraction_numerical': 0.0009950248756218905, 'mean_word_length': 10.054945054945055, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '76703', 'license': 'MIT', 'n_tokens_mistral': 386, 'n_tokens_neox': 383, 'n_words': 48, 'path': '01-notes/03-missing.ipynb', 'repo_name': 'chilperic/scipy-2017-tutorial-pandas', 'size': '1005'}