fg-data-profiling README

The project's README from github.com/Data-Centric-AI-Community/fg-data-profiling. As one markdown file: README.md.

fg-data-profiling

ydata-profiling is now fg-data-profiling. This package has been renamed to fg-data-profiling. Please follow the Migration Guide as soon as possible — the old package will no longer receive updates or bug fixes.

Build Status PyPI download month Code Coverage Release Version Python Version Code style: black

Data Profiling Logo

Documentation | Discord | Stack Overflow | Latest changelog

Do you like this project? Show us your love and give feedback!

fg-data-profiling primary goal is to provide a one-line Exploratory Data Analysis (EDA) experience in a consistent and fast solution. Like pandas df.describe() function, that is so handy, fg-data-profiling delivers an extended analysis of a DataFrame while allowing the data analysis to be exported in different formats such as html and json.

The package outputs a simple and digested analysis of a dataset, including time-series and text.

Looking for a scalable solution that can fully integrate with your database systems?
Leverage YData Fabric Data Catalog to connect to different databases and storages (Oracle, snowflake, PostGreSQL, GCS, S3, etc.) and leverage an interactive and guided profiling experience in Fabric. Check out the Community Version.

Migration Guide

1. Uninstall the old package

pip uninstall ydata-profiling

2. Install the new package

pip install fg-data-profiling

3. Update your imports

Find and replace all occurrences of the old import in your codebase:

# Before
import ydata_profiling
from ydata_profiling import ProfileReport

# After
import data_profiling
from data_profiling import ProfileReport

You can use this one-liner to find all affected files:

grep -r "ydata_profiling" . --include="*.py"

▶️ Quickstart

Install

pip install fg-data-profiling

or

conda install -c conda-forge fg-data-profiling

Start profiling

Start by loading your pandas DataFrame as you normally would, e.g. by using:

import numpy as np
import pandas as pd
from data_profiling import ProfileReport

df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])

To generate the standard profiling report, merely run:

profile = ProfileReport(df, title="Profiling Report")

📊 Key features

The report contains three additional sections:

🎁 Latest features

✨ Spark

Spark support has been released, but we are always looking for an extra pair of hands 👐. Check current work in progress!.

📝 Use cases

fg-data-profiling can be used to deliver a variety of different use-case. The documentation includes guides, tips and tricks for tackling them:

Use case Description
Comparing datasets Comparing multiple version of the same dataset
Profiling a Time-Series dataset Generating a report for a time-series dataset with a single line of code
Profiling large datasets Tips on how to prepare data and configure fg-data-profiling for working with large datasets
Handling sensitive data Generating reports which are mindful about sensitive data in the input dataset
Dataset metadata and data dictionaries Complementing the report with dataset details and column-specific data dictionaries
Customizing the report's appearance Changing the appearance of the report's page and of the contained visualizations
Profiling Databases For a seamless profiling experience in your organization's databases, check Fabric Data Catalog, which allows to consume data from different types of storages such as RDBMs (Azure SQL, PostGreSQL, Oracle, etc.) and object storages (Google Cloud Storage, AWS S3, Snowflake, etc.), among others.

Using inside Jupyter Notebooks

There are two interfaces to consume the report inside a Jupyter notebook: through widgets and through an embedded HTML report.

Notebook Widgets

The above is achieved by simply displaying the report as a set of widgets. In a Jupyter Notebook, run:

profile.to_widgets()

The HTML report can be directly embedded in a cell in a similar fashion:

profile.to_notebook_iframe()
HTML

Exporting the report to a file

To generate a HTML report file, save the ProfileReport to an object and use the to_file() function:

profile.to_file("your_report.html")

Alternatively, the report's data can be obtained as a JSON file:

# As a JSON string
json_data = profile.to_json()

# As a file
profile.to_file("your_report.json")

Using in the command line

For standard formatted CSV files (which can be read directly by pandas without additional settings), the data_profiling executable can be used in the command line. The example below generates a report named Example Profiling Report, using a configuration file called default.yaml, in the file report.html by processing a data.csv dataset.

data_profiling --title "Example Profiling Report" --config_file default.yaml data.csv report.html

Additional details on the CLI are available on the documentation.

👀 Examples

The following example reports showcase the potentialities of the package across a wide range of dataset and data types:

🛠️ Installation

Additional details, including information about widget support, are available on the documentation.

Using pip

PyPi Downloads PyPi Monthly Downloads PyPi Version

You can install using the pip package manager by running:

pip install -U fg-data-profiling

Extras

The package declares "extras", sets of additional dependencies.

Install these with e.g.

pip install -U fg-data-profiling[notebook,unicode,pyspark]

Using conda

Conda Downloads Conda Version

You can install using the conda package manager by running:

conda install -c conda-forge fg-data-profiling

From source (development)

Download the source code by cloning the repository or click on Download ZIP to download the latest stable version.

Install it by navigating to the proper directory and running:

pip install -e .

The profiling report is written in HTML and CSS, which means a modern browser is required.

You need Python 3 to run the package. Other dependencies can be found in the requirements files:

Filename Requirements
requirements.txt Package requirements
requirements-dev.txt Requirements for development
requirements-test.txt Requirements for testing
setup.py Requirements for widgets etc.

🔗 Integrations

To maximize its usefulness in real world contexts, fg-data-profiling has a set of implicit and explicit integrations with a variety of other actors in the Data Science ecosystem:

Integration type Description
Other DataFrame libraries How to compute the profiling of data stored in libraries other than pandas
Great Expectations Generating Great Expectations expectations suites directly from a profiling report
Interactive applications Embedding profiling reports in Streamlit, Dash or Panel applications
Pipelines Integration with DAG workflow execution tools like Airflow or Kedro
Cloud services Using fg-data-profiling in hosted computation services like Lambda, Google Cloud or Kaggle
IDEs Using fg-data-profiling directly from integrated development environments such as PyCharm

🙋 Support

Need help? Want to share a perspective? Report a bug? Ideas for collaborations? Reach out via the following channels:

Need Help?
Get your questions answered with a product owner by booking a Pawsome chat! 🐼

❗ Before reporting an issue on GitHub, check out Common Issues.

🤝🏽 Contributing

Learn how to get involved in the Contribution Guide.

A low-threshold place to ask questions or start contributing is the Data Centric AI Community's Discord.

A big thank you to all our amazing contributors!

Contributors wall made with contrib.rocks.

fg-data-profiling (Data-Centric-AI-Community/fg-data-profiling)

Searching Database…

这是什么?fg-data-profiling(原名 ydata-profiling / pandas-profiling)是一个 Python 包,可以为 pandas 或 Spark DataFrame 生成一行代码即可运行的探索性数据分析(EDA)报告,类似 df.describe(),但详细得多。
这是库还是独立应用?它是围绕 ProfileReport 类构建的 Python 库;另外还附带一个小型命令行工具 dataprofiling,可以直接在终端中处理标准 CSV 文件。
我怎样从 DataFrame 生成报告?像平常一样加载你的 pandas DataFrame,然后创建 ProfileReport(df),调用它的 to_file() 方法导出 HTML 报告,或者获取 JSON 格式的数据;在 Jupyter 中,它还可以渲染为交互式组件或嵌入式 HTML 单元格。
使用它需要 Spark 还是只要 pandas?pandas 是默认选项,也是入门所需的全部;Spark 支持是可选的附加功能,用于将分析扩展到大型数据集,通过 [pyspark] 附加项启用。
这和 pandas-profiling 或 ydata-profiling 是同一个项目吗?是的——它此前以 pandas-profiling 发布,后来改名为 ydata-profiling,现在又更名为 fg-data-profiling。旧版包已不再接收更新或错误修复,因此现有用户需要按照迁移指南操作,并更新其导入语句。
生成的报告包含哪些内容?包括提供数据集级统计信息的概览(Overview)、标记高相关性、偏度、缺失值和常量列等问题的警报(Alerts)部分,以及单变量/多变量分析,还有包含耗时和配置详情的复现(Reproduction)部分。
它能比较同一数据集的两个版本吗?可以,它提供一行代码的方案来生成比较两个数据集的报告,例如预处理前后的数据对比。
它会对时间序列、文本或图像数据做特殊处理吗?会——对于时间序列列,它会添加自相关和季节性分析,并提供 ACF/PACF 图;对于文本,它会进行文字系统(脚本)和类别检测;对于图像,它会检查文件大小、尺寸和 EXIF 信息。
它还能与哪些工具集成?它可以与 Great Expectations 集成以生成期望套件,与 Streamlit、Dash 和 Panel 等交互式应用集成,与 Airflow 和 Kedro 等流水线工具集成,并支持 Lambda、Google Cloud 和 Kaggle 等云环境。
Size
898.3 MB
Stars
13.7K
Age
10y
Commits · 90 Days