<jupyter_start><jupyter_text>Chapter 4 - outliners with bivariate relationships<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
covidtotals = pd.read_csv("data/covidtotals.csv")
covidtotals.set_index("iso_code", inplace=True)
covidtotals.iloc[0:5,0:5]
covidtotals.loc[("DZA","AFG"),("total_cases","location","total_deaths")]
totvars = ['location', 'total_cases', 'total_deaths',
       'total_cases_pm', 'total_deaths_pm']

demovars = ['population', 'pop_density',
       'median_age', 'gdp_per_capita', 'hosp_beds']
covidtotals.corr(method="pearson")
plt.figure(figsize=(10,5))
sns.set(font_scale=1.5)
sns.heatmap(covidtotals.corr(method="pearson"),cmap="Blues", annot=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15858453473132372, 'fraction_numerical': 0.01310615989515072, 'mean_word_length': 8.922077922077921, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '202364', 'license': 'MIT', 'n_tokens_mistral': 316, 'n_tokens_neox': 297, 'n_words': 44, 'path': 'Chapter04/myCode/outliners_2var.ipynb', 'repo_name': 'royceto/Python-Data-Cleaning-Cookbook', 'size': '763'}