Python之pandas-profiling:pandas-profiling库的简介、安装、使用方法之详细攻略
从pandas数据路由生成配置文件报告。pandas df.describe()函数很棒,但对于严肃的探索性数据分析来说有点基础。pandas_profiling通过php .profile_report()扩展了pandas DataFrame,用于快速数据分析。对于每一列,以下统计数据-如果与列类型相关-在一个交互式HTML报告中显示:
pip install pandas-profiling
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, title="Pandas Profiling Report")
profile.to_file("your_report.html")
profile = ProfileReport(large_dataset, minimal=True)
profile.to_file("output.html")
profile = df.profile_report(title='Pandas Profiling Report', plot={'histogram': {'bins': 8}})
profile.to_file("output.html")
联系客服