#!/usr/bin/env python3 import numpy as np import pandas as pd from pandas_profiling import ProfileReport df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"]) profile = ProfileReport(df) profile.to_file("your_report.html") # As a JSON string json_data = profile.to_json() # As a file profile.to_file("your_report.json")