EDA是数据分析必须的过程,用来查看变量统计特征,可以此为基础尝试做特征工程。
1. Pandas_Profiling
这个属于三个中最轻便、简单的了。它可以快速生成报告,一览变量概况。首先,我们需要安装该软件包。
# 安装Jupyter扩展widget
jupyter nbextension enable --py widgetsnbextension
# 或者通过conda安装
conda env create -n pandas-profiling
conda activate pandas-profiling
conda install -c conda-forge pandas-profiling
# 或者直接从源地址安装
pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip
安装成功后即可导入数据直接生成报告了。
import pandas as pd
import seaborn as sns
mpg = sns.load_dataset('mpg')
mpg.head()
from pandas_profiling import ProfileReport
profile = ProfileReport(mpg, title='MPG Pandas Profiling Report', explorative = True)
profile

本文介绍了Python数据分析中三个强大的EDA工具:Pandas Profiling、Sweetviz和PandasGUI。Pandas Profiling提供快速报告,详细展示变量信息;Sweetviz能生成独立HTML报告并进行数据集比较;PandasGUI则提供GUI界面,方便数据过滤和绘图。每个工具各有特色,适合不同阶段的数据分析需求。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



