The autoreload instruction reloads modules automatically before code execution, which is helpful for the update below.

In [ ]:
%load_ext autoreload
%autoreload 2

Make sure that we have the latest version of pandas-profiling.

In [ ]:
import sys

!"{sys.executable}" -m pip install -U pandas-profiling[notebook]
!jupyter nbextension enable --py widgetsnbextension

You might want to restart the kernel now.

In [ ]:
# Standard Library Imports
from pathlib import Path

# Installed packages
import pandas as pd
from ipywidgets import widgets

# Our package
from pandas_profiling import ProfileReport
from pandas_profiling.utils.cache import cache_file
In [ ]:
# Read the Titanic Dataset
file_name = cache_file(
df = pd.read_csv(file_name)
In [ ]:
# Generate the Profiling Report
profile = ProfileReport(
    df, title="Titanic Dataset", html={"style": {"full_width": True}}, sort=None
In [ ]:
# The Notebook Widgets Interface
In [ ]:
# Or use the HTML report in an iframe