Metadata-Version: 2.4
Name: eazydatafix
Version: 0.3.0
Summary: Deterministic data quality, cleaning, and Agentic EDA workflows for Python.
Author: Suneel Kumar Kola
License-Expression: MIT
Project-URL: Homepage, https://eazydatafix.com
Project-URL: Repository, https://github.com/suneelprojects/eazydatafix
Project-URL: Documentation, https://eazydatafix.com/docs
Project-URL: Issues, https://github.com/suneelprojects/eazydatafix/issues
Project-URL: Changelog, https://github.com/suneelprojects/eazydatafix/blob/develop/CHANGELOG.md
Keywords: data-quality,data-cleaning,data-validation,data-profiling,pandas,etl,data-analysis,exploratory-data-analysis,agentic-eda
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.0.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: matplotlib>=3.8.0
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: reportlab>=4.0.0
Provides-Extra: parquet
Requires-Dist: pyarrow>=14.0.0; extra == "parquet"
Dynamic: license-file

# 🛠️ EazyDataFix

[![PyPI version](https://img.shields.io/pypi/v/eazydatafix)](https://pypi.org/project/eazydatafix/)
[![Python Versions](https://img.shields.io/pypi/pyversions/eazydatafix)](https://pypi.org/project/eazydatafix/)
[![License](https://img.shields.io/github/license/suneelprojects/eazydatafix)](LICENSE)
[![Downloads](https://img.shields.io/pypi/dm/eazydatafix)](https://pypi.org/project/eazydatafix/)
[![GitHub Release](https://img.shields.io/github/v/release/suneelprojects/eazydatafix)](https://github.com/suneelprojects/eazydatafix/releases)
[![GitHub Stars](https://img.shields.io/github/stars/suneelprojects/eazydatafix?style=social)](https://github.com/suneelprojects/eazydatafix)

> A modern Python library for **data quality assessment, validation, and automated data cleaning**.

EazyDataFix helps data analysts, data scientists, machine learning engineers, and ETL developers quickly identify data quality issues and generate professional reports with just a few lines of code.

---

# 🌐 Documentation

📚 **Documentation Website**

https://eazydatafix.com

📖 **API Reference**

https://eazydatafix.com/docs

---

# 🚀 Quick Links

- 📦 PyPI — https://pypi.org/project/eazydatafix/
- 🌍 Documentation — https://eazydatafix.com
- 📖 API Reference — https://eazydatafix.com/docs
- 💻 GitHub — https://github.com/suneelprojects/eazydatafix

---

## ✨ Features

- 📊 Data Quality Assessment
- ✅ Missing Value Detection
- 🔍 Duplicate Detection
- ✔️ Data Validation
- 🧹 Data Consistency Checks
- 🎯 Data Accuracy Checks
- ⏱️ Timeliness Checks
- 💡 Intelligent Recommendations
- 📄 Console Report
- 🌐 HTML Report
- 📑 PDF Report
- 📈 Excel Report
- 📋 CSV Report
- 📦 JSON Report
- 📝 Markdown Report
- 🧭 Deterministic EDA Planning and Execution
- 🤖 Deterministic Agentic EDA Orchestration
- 📊 Reproducible Agentic EDA Reports and PNG Visualisations

---

# Installation

EazyDataFix supports Python 3.10–3.13.

```bash
pip install eazydatafix
```

For Parquet support:

```bash
pip install eazydatafix[parquet]
```

---

# Core APIs

```python
import eazydatafix as edf

edf.profile(...)

edf.assess(...)

edf.assess_ai_readiness(...)

edf.eda(...)

edf.plan_eda(...)

edf.execute_eda(...)

edf.run_agentic_eda(...)

edf.export_agentic_eda_report(...)

edf.fix(...)

edf.prepare(...)

edf.analysis_ready(...)
```

---

# Quick Start

```python
import eazydatafix as edf

report = edf.assess("employees.csv")

report.summary()

report.to_html()

report.to_pdf()

report.to_excel()

report.to_json()

report.to_csv()

report.to_markdown()
```

---

# Deterministic EDA

Generate a structured exploratory data analysis result without using an LLM.

```python
import eazydatafix as edf

eda_result = edf.eda("employees.csv")

print(eda_result.shape)
print(eda_result.semantic_roles)
print(eda_result.identifier_columns)
print(eda_result.datetime_columns)
print(eda_result.numeric_statistics)
print(eda_result.categorical_summaries)
print(eda_result.observations)
print(eda_result.recommendations)
```

`edf.eda(...)` accepts pandas DataFrames, CSV, Excel, JSON, and Parquet files
through the existing EazyDataFix datasource system.

EDA deterministically classifies columns as numeric measures, categorical
dimensions, identifiers, datetimes, or booleans. Identifier, datetime, and
boolean columns are excluded from numeric statistics and correlations.

---

# Deterministic EDA Planner

Build a reproducible follow-up analysis plan from an existing `EDAResult`.

```python
import eazydatafix as edf

eda_result = edf.eda("employees.csv")
plan = edf.plan_eda(eda_result)

for step in plan.selected_steps:
    print(step.name, step.priority, step.reason)

for step in plan.skipped_steps:
    print(step.name, step.reason)

print(plan.warnings)
print(plan.deterministic_summary)
```

The planner uses semantic roles and statistics from `EDAResult` to explain why
each supported analysis is selected or skipped. It does not call an LLM.

---

# Deterministic EDA Executor

Execute selected plan steps through deterministic analysis handlers.

```python
import eazydatafix as edf

execution = edf.execute_eda("employees.csv")

for step in execution.executed_steps:
    print(step.name, step.status, step.output)

print(execution.execution_order)
print(execution.warnings)
print(execution.deterministic_summary)
```

`edf.execute_eda(...)` automatically creates the `EDAResult` and `EDAPlan` when
they are not supplied. Existing results and plans can be reused explicitly:

```python
eda_result = edf.eda("employees.csv")
plan = edf.plan_eda(eda_result)
execution = edf.execute_eda(
    "employees.csv",
    result=eda_result,
    plan=plan,
)
```

Execution results can be converted to a JSON-ready dictionary with
`execution.to_dict()`. Selected steps record `success` or `failure`; planned
skips remain visible with `skipped` status.

---

# Deterministic Agentic EDA

Run dataset understanding, planning, execution, and traceable follow-up
decision generation as one reproducible workflow.

```python
import json

import eazydatafix as edf

config = edf.AgenticEDAConfig(
    correlation_threshold=0.85,
    outlier_iqr_multiplier=1.5,
    class_imbalance_threshold=0.80,
)
workflow = edf.run_agentic_eda("employees.csv", config=config)

print(workflow.overall_status)
print(workflow.priority_findings)
print(workflow.follow_up_actions)
print(workflow.recommended_visualisations)
print(workflow.unresolved_questions)

json_output = json.dumps(workflow.to_dict(), indent=2)
```

Every action, visualisation, question, and finding identifies its source
execution step, target columns, priority, reason, and prerequisites. The
orchestrator is deterministic, does not mutate DataFrames, and does not use an
LLM. Visualisation recommendations and unresolved questions can be disabled,
and recommendation counts can be bounded with `AgenticEDAConfig`.

---

# Agentic EDA Reports

Convert an existing `AgenticEDAResult` into reproducible HTML and JSON report
artifacts. Markdown is available as an optional format.

```python
import eazydatafix as edf

workflow = edf.run_agentic_eda("employees.csv")

report = edf.export_agentic_eda_report(
    workflow,
    dataset="employees.csv",  # Optional: enables honest raw-data charts.
    output_dir="eda-report",
    formats=["html", "json", "markdown"],
)

print(report.generated_files)
print(report.generated_visualisations)
print(report.skipped_visualisations)
print(report.status)
```

Without `dataset`, charts supported by structured execution outputs—such as
missing values, categorical distributions, correlations, and datetime
frequencies—are still generated. Histograms and box plots are explicitly
recorded as skipped unless a matching dataset is supplied. The dataset is
validated against the workflow and copied; the workflow and caller DataFrame
are never mutated.

Example output:

```text
eda-report/
├── agentic-eda-report.html
├── agentic-eda-report.json
├── agentic-eda-report.md
└── visualisations/
    ├── 01-missing-value-chart-phone-salary.png
    ├── 02-bar-chart-department.png
    └── 03-time-series-line-chart-joining-date.png
```

Report filenames, section order, chart filenames, JSON key ordering, and
artifact tracking are deterministic. Existing known artifact files are
overwritten predictably; unrelated files in the output directory are
preserved.

---

# Example Console Output

```
======================================================================
                       🛠️ EASY DATA FIX REPORT
======================================================================

Overall Score : 90.37

Grade         : A

Completeness  : 96.97%

Uniqueness    : 100.00%

Validity      : 55.00%

Consistency   : 100.00%

Accuracy      : 100.00%

Timeliness    : 100.00%
```

---

# Supported Quality Dimensions

| Dimension | Status |
|-----------|--------|
| Completeness | ✅ |
| Uniqueness | ✅ |
| Validity | ✅ |
| Consistency | ✅ |
| Accuracy | ✅ |
| Timeliness | ✅ |

---

# Report Formats

EazyDataFix can generate reports in multiple formats.

```python
report.summary()

report.to_html()

report.to_pdf()

report.to_excel()

report.to_json()

report.to_csv()

report.to_markdown()
```

---

# Supported Data Sources

EazyDataFix accepts datasets in a variety of formats.

Both `edf.assess(...)` and `edf.fix(...)` work with:

- Pandas `DataFrame`
- CSV files
- Excel files (`.xlsx` / `.xls`)
- JSON files
- Parquet files

Loading is handled by the modular `eazydatafix.datasources` package, allowing custom data source plugins.

```python
import pandas as pd

from eazydatafix.datasources import (
    DataSource,
    default_registry,
)


class TSVDataSource(DataSource):

    name = "tsv"

    def can_load(self, source):
        from pathlib import Path
        return isinstance(source, Path) and source.suffix.lower() == ".tsv"

    def load(self, source):
        return pd.read_csv(source, sep="\t")


default_registry.register(TSVDataSource())

# edf.assess(...) and edf.fix(...) now support TSV files.
```

---

# Why EazyDataFix?

EazyDataFix is designed to make data quality assessment simple and accessible.

Whether you're validating datasets before machine learning, preparing ETL pipelines, or cleaning business reports, EazyDataFix provides a consistent way to measure and improve data quality with minimal code.

---

# Roadmap

## ✅ Completed

- Assessment Engine
- Validation Engine
- Recommendation Engine
- Reporting Engine
- Auto Fix Foundation

## 🚀 Coming Soon

- Data Profiling
- CLI Support
- Streamlit Dashboard
- SQL Support
- Apache Spark Support
- Interactive Charts
- AI Recommendations

---

# Contributing

Contributions are always welcome.

Feel free to:

- ⭐ Star the repository
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests

GitHub Repository:

https://github.com/suneelprojects/eazydatafix

Documentation:

https://eazydatafix.com

---

# License

MIT License

---

Made with ❤️ by **Suneel Kumar Kola**

🌐 https://eazydatafix.com
