This is a self-correcting activity generated by nbgrader. Fill in any place that says YOUR CODE HERE or YOUR ANSWER HERE. Run subsequent cells to check your code.


pandas

(Inspired by an activity in the Open Machine Learning Course)

Part 1 : Loading data

# Import base packages
import numpy as np
import pandas as pd

Question

Use Pandas to load the dataset located here, which was extracted from this Kaggle competition. Store it into a DataFrame named df_olympics.

# YOUR CODE HERE
print(f'df_olympics: {df_olympics.shape}')

assert isinstance(df_olympics, pd.DataFrame)
assert df_olympics.shape == (271116, 15)

Part 2: Exploring data

Question

Print general information about the DataFrame.

# YOUR CODE HERE

Question

Print and observe the first 10 records of the dataset.

# YOUR CODE HERE

Question

Print and observe 5 random records of the dataset.

# YOUR CODE HERE