| name | ydata-profiling-7-html-report-customization |
| description | Sub-skill of ydata-profiling: 7. HTML Report Customization. |
| version | 1.0.0 |
| category | data-analysis |
| type | reference |
| scripts_exempt | true |
7. HTML Report Customization
7. HTML Report Customization
Custom Report Configuration:
from ydata_profiling import ProfileReport
import pandas as pd
df = pd.read_csv("data.csv")
profile = ProfileReport(
df,
title="Custom Styled Report",
dataset={
"description": "This is a sample dataset for analysis",
"creator": "Data Team",
"copyright_holder": "Company Inc.",
"copyright_year": "2025",
"url": "https://company.com/data"
},
variables={
"descriptions": {
"revenue": "Total revenue in USD",
"units": "Number of units sold",
"category": "Product category"
}
},
html={
"style": {
"full_width": True
},
"navbar_show": True,
"minify_html": True
},
progress_bar=True
)
profile.to_file("custom_report.html")
Report Sections Control:
from ydata_profiling import ProfileReport
import pandas as pd
df = pd.read_csv("data.csv")
profile = ProfileReport(
df,
title="Selective Report",
samples={
"head": 10,
"tail": 10
},
duplicates={
"head": 10
},
correlations={
"pearson": {"calculate": True},
"spearman": {"calculate": False},
"kendall": {"calculate": False},
"phi_k": {"calculate": False}
},
missing_diagrams={
"bar": True,
"matrix": False,
"heatmap": False
}
)
profile.to_file("selective_report.html")
Export Options:
from ydata_profiling import ProfileReport
import pandas as pd
import json
df = pd.read_csv("data.csv")
profile = ProfileReport(df, title="Export Demo")
profile.to_file("report.html")
profile.to_file("report.json")
json_output = profile.to_json()
description_dict = profile.get_description()
profile.to_widgets()