Skip to content

Introduction to Statistics in Python

Run the hidden code cell below to import the data used in this course.

# Importing numpy and pandas
import numpy as np
import pandas as pd

# Importing the course datasets
deals = pd.read_csv("datasets/amir_deals.csv")
happiness = pd.read_csv("datasets/world_happiness.csv")
food = pd.read_csv("datasets/food_consumption.csv")
!pip install ydata_profiling
Hidden output
from ydata_profiling import ProfileReport
profile = ProfileReport(deals, title="Pandas Profiling Report")
profile.to_file("deals.html")
Hidden output
print(deals.shape, '\n')
print(deals.head(), '\n')

for i, column in enumerate(deals.columns, 1):
    column_length = len(deals[column])
    print(f'Column {i}: {column} (Type: {deals[column].dtype}, Elements: {column_length})', '\n')
    
print(deals.describe(), '\n')