Timothy Helton
NOTE:
This notebook uses code found in the
k2datascience.olympics module.
To execute all the cells do one of the following items:
In [1]:
from k2datascience import olympics
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
%matplotlib inline
In [2]:
oly = olympics.Medals()
print(f'{"#" * 30}\nAthletes Data\n\n')
print(f'Data Types:\n{oly.athletes.dtypes}\n\n')
print(f'Data Shape:\n{oly.athletes.shape}\n\n')
print(f'Missing Data:\n{oly.athletes.isnull().sum()}\n\n')
oly.athletes.head()
oly.athletes.tail()
oly.athletes.describe()
print(f'\n\n\n{"#" * 30}\nCountries Data\n\n')
print(f'Data Types:\n{oly.countries.dtypes}\n\n')
print(f'Data Shape:\n{oly.countries.shape}\n\n')
print(f'Missing Data:\n{oly.countries.isnull().sum()}\n\n')
oly.countries.head()
oly.countries.tail()
oly.countries.describe()
Out[2]:
Out[2]:
Out[2]:
Out[2]:
Out[2]:
Out[2]:
In [3]:
oly.calc_age_means()
Out[3]:
In [4]:
oly.common_full_birthday()
In [5]:
oly.common_month_day_birthday()
Out[5]:
In [6]:
(oly.country_medals
.query('total > 100')
.sort_values('total', ascending=False))
Out[6]:
In [7]:
oly.country_medals_plot()
In [8]:
oly.weightlifting_classes()
The predicted weight classes are displayed in text boxes outlined in crimson.
In [9]:
oly.height_histograms()
In [10]:
oly.height_boxplot()
In [11]:
oly.height_sport()