📜  使用Python在 Pandas 中进行数据分析

📅  最后修改于: 2022-05-13 01:55:35.423000             🧑  作者: Mango

使用Python在 Pandas 中进行数据分析

Pandas是最流行的Python库之一,主要用于数据操作和分析。当我们处理大数据时,很多时候我们需要执行探索性数据分析。我们需要获取有关可用的不同列的详细描述以及关系、空值检查、数据类型、缺失值等。因此,Pandas 分析是执行 EDA 并仅用几行代码给出详细描述的Python模块。

安装:

pip install pandas-profiling

例子:

#import the packages
import pandas as pd
import pandas_profiling
   
# read the file
df = pd.read_csv('Geeks.csv')
   
# run the profile report
profile = df.profile_report(title='Pandas Profiling Report')
   
# save the report as html file
profile.to_file(output_file="pandas_profiling1.html")
   
# save the report as json file
profile.to_file(output_file="pandas_profiling2.json")

输出:

python-数据分析-1

HTML 文件:

python-data-profiling-html 文件

JSON文件:

python-data-profiling-json 文件