Pandas profiling
对数据集进行探索性数据分析。
安装:
pip3 install pandas-profiling
导入:
from pandas_profiling import ProfileReport
生成报告:数据集df
profile = ProfileReport(df)
profile
刚发现已经更新了,使用上面的方法会出现错误PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package
需要重新安装
pip3 install ydata-profiling
导入
from ydata_profiling import ProfileReport
生成报告并保存:数据集df_h
profile = ProfileReport(df_h)
profile.to_file("./new_data/my_report.html")