eazydatafix 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eazydatafix-0.2.0/LICENSE +21 -0
- eazydatafix-0.2.0/MANIFEST.in +4 -0
- eazydatafix-0.2.0/PKG-INFO +257 -0
- eazydatafix-0.2.0/README.md +224 -0
- eazydatafix-0.2.0/eazydatafix/__init__.py +53 -0
- eazydatafix-0.2.0/eazydatafix/assessment/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/accuracy/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/accuracy/engine.py +32 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/accuracy/numeric_range_check.py +70 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/completeness.py +40 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/consistency/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/consistency/case_consistency_check.py +65 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/consistency/duplicate_text_check.py +58 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/consistency/engine.py +40 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/consistency/whitespace_consistency_check.py +57 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/timeliness/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/timeliness/engine.py +36 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/timeliness/future_date_check.py +63 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/timeliness/stale_data_check.py +68 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/uniqueness.py +42 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/aadhaar_check.py +63 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/credit_card_check.py +91 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/date_check.py +65 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/email_check.py +60 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/engine.py +48 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/gstin_check.py +65 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/ip_address_check.py +63 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/pan_check.py +62 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/phone_check.py +66 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/pincode_check.py +65 -0
- eazydatafix-0.2.0/eazydatafix/assessment/checks/validity/url_check.py +66 -0
- eazydatafix-0.2.0/eazydatafix/assessment/engine.py +135 -0
- eazydatafix-0.2.0/eazydatafix/assessment/engines/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/assessment/profiler.py +35 -0
- eazydatafix-0.2.0/eazydatafix/console_report.py +171 -0
- eazydatafix-0.2.0/eazydatafix/contracts/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/contracts/check.py +24 -0
- eazydatafix-0.2.0/eazydatafix/contracts/fix_step.py +23 -0
- eazydatafix-0.2.0/eazydatafix/contracts/fix_strategy.py +27 -0
- eazydatafix-0.2.0/eazydatafix/core/column_profiler.py +150 -0
- eazydatafix-0.2.0/eazydatafix/core/dataset_loader.py +12 -0
- eazydatafix-0.2.0/eazydatafix/core/score_calculator.py +57 -0
- eazydatafix-0.2.0/eazydatafix/core/type_mapper.py +34 -0
- eazydatafix-0.2.0/eazydatafix/datasources/__init__.py +41 -0
- eazydatafix-0.2.0/eazydatafix/datasources/base.py +46 -0
- eazydatafix-0.2.0/eazydatafix/datasources/csv.py +29 -0
- eazydatafix-0.2.0/eazydatafix/datasources/dataframe.py +23 -0
- eazydatafix-0.2.0/eazydatafix/datasources/excel.py +29 -0
- eazydatafix-0.2.0/eazydatafix/datasources/json.py +29 -0
- eazydatafix-0.2.0/eazydatafix/datasources/loader.py +95 -0
- eazydatafix-0.2.0/eazydatafix/datasources/parquet.py +41 -0
- eazydatafix-0.2.0/eazydatafix/datasources/registry.py +49 -0
- eazydatafix-0.2.0/eazydatafix/diagnosis/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/diagnosis/engine.py +41 -0
- eazydatafix-0.2.0/eazydatafix/diagnosis/report.py +0 -0
- eazydatafix-0.2.0/eazydatafix/enums/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/enums/data_type.py +17 -0
- eazydatafix-0.2.0/eazydatafix/exceptions.py +16 -0
- eazydatafix-0.2.0/eazydatafix/fix/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/fix/column_normalizer.py +47 -0
- eazydatafix-0.2.0/eazydatafix/fix/datatype_converter.py +57 -0
- eazydatafix-0.2.0/eazydatafix/fix/duplicate_remover.py +32 -0
- eazydatafix-0.2.0/eazydatafix/fix/empty_column_remover.py +34 -0
- eazydatafix-0.2.0/eazydatafix/fix/empty_row_remover.py +33 -0
- eazydatafix-0.2.0/eazydatafix/fix/engine.py +86 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/base.py +20 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/drop.py +37 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/factory.py +32 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/mean.py +44 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/median.py +44 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/mode.py +35 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/register.py +53 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies/smart.py +102 -0
- eazydatafix-0.2.0/eazydatafix/fix/strategies.py +0 -0
- eazydatafix-0.2.0/eazydatafix/fix/whitespace_trimmer.py +33 -0
- eazydatafix-0.2.0/eazydatafix/models/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/models/assessment_report.py +102 -0
- eazydatafix-0.2.0/eazydatafix/models/comparison_report.py +38 -0
- eazydatafix-0.2.0/eazydatafix/models/dataset_info.py +13 -0
- eazydatafix-0.2.0/eazydatafix/models/dataset_profile.py +23 -0
- eazydatafix-0.2.0/eazydatafix/models/diagnosis_issue.py +14 -0
- eazydatafix-0.2.0/eazydatafix/models/diagnosis_report.py +56 -0
- eazydatafix-0.2.0/eazydatafix/models/fix_config.py +18 -0
- eazydatafix-0.2.0/eazydatafix/models/fix_result.py +57 -0
- eazydatafix-0.2.0/eazydatafix/models/quality_dimensions.py +30 -0
- eazydatafix-0.2.0/eazydatafix/models/quality_score.py +11 -0
- eazydatafix-0.2.0/eazydatafix/models/recommendation.py +14 -0
- eazydatafix-0.2.0/eazydatafix/models/validation_result.py +13 -0
- eazydatafix-0.2.0/eazydatafix/plugins/__init__.py +17 -0
- eazydatafix-0.2.0/eazydatafix/plugins/base.py +24 -0
- eazydatafix-0.2.0/eazydatafix/plugins/defaults.py +32 -0
- eazydatafix-0.2.0/eazydatafix/plugins/registry.py +60 -0
- eazydatafix-0.2.0/eazydatafix/prepare/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/prepare/engine.py +153 -0
- eazydatafix-0.2.0/eazydatafix/prepare/steps/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/prepare/steps/optimize_dtypes.py +0 -0
- eazydatafix-0.2.0/eazydatafix/recommendations/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/recommendations/engine.py +157 -0
- eazydatafix-0.2.0/eazydatafix/rendering/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/rendering/console.py +69 -0
- eazydatafix-0.2.0/eazydatafix/reporting/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/reporting/csv_report.py +159 -0
- eazydatafix-0.2.0/eazydatafix/reporting/excel_report.py +225 -0
- eazydatafix-0.2.0/eazydatafix/reporting/html_report.py +131 -0
- eazydatafix-0.2.0/eazydatafix/reporting/json_report.py +65 -0
- eazydatafix-0.2.0/eazydatafix/reporting/markdown_report.py +126 -0
- eazydatafix-0.2.0/eazydatafix/reporting/pdf_report.py +270 -0
- eazydatafix-0.2.0/eazydatafix/reporting/templates/report.html +272 -0
- eazydatafix-0.2.0/eazydatafix/validation/__init__.py +0 -0
- eazydatafix-0.2.0/eazydatafix/validation/engine.py +48 -0
- eazydatafix-0.2.0/eazydatafix.egg-info/PKG-INFO +257 -0
- eazydatafix-0.2.0/eazydatafix.egg-info/SOURCES.txt +125 -0
- eazydatafix-0.2.0/eazydatafix.egg-info/dependency_links.txt +1 -0
- eazydatafix-0.2.0/eazydatafix.egg-info/requires.txt +7 -0
- eazydatafix-0.2.0/eazydatafix.egg-info/top_level.txt +1 -0
- eazydatafix-0.2.0/pyproject.toml +85 -0
- eazydatafix-0.2.0/setup.cfg +4 -0
- eazydatafix-0.2.0/tests/test_assessment_engine.py +19 -0
- eazydatafix-0.2.0/tests/test_dataset_profiler.py +29 -0
- eazydatafix-0.2.0/tests/test_dataset_profiler_formats.py +105 -0
- eazydatafix-0.2.0/tests/test_datasources.py +356 -0
- eazydatafix-0.2.0/tests/test_reports.py +41 -0
- eazydatafix-0.2.0/tests/test_score_calculator.py +54 -0
- eazydatafix-0.2.0/tests/test_validation_engine.py +35 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Suneel Kumar Kola
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: eazydatafix
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A modern Python library for data quality assessment, validation, and automated data cleaning.
|
|
5
|
+
Author: Suneel Kumar Kola
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://eazydatafix.com
|
|
8
|
+
Project-URL: Repository, https://github.com/suneelprojects/eazydatafix
|
|
9
|
+
Project-URL: Documentation, https://eazydatafix.com/docs
|
|
10
|
+
Project-URL: Issues, https://github.com/suneelprojects/eazydatafix/issues
|
|
11
|
+
Keywords: data-quality,data-cleaning,data-validation,data-profiling,pandas,etl,data-analysis
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: pandas>=2.0.0
|
|
27
|
+
Requires-Dist: numpy>=1.26.0
|
|
28
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
29
|
+
Requires-Dist: reportlab>=4.0.0
|
|
30
|
+
Provides-Extra: parquet
|
|
31
|
+
Requires-Dist: pyarrow>=14.0.0; extra == "parquet"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# 🛠️ EazyDataFix
|
|
35
|
+
|
|
36
|
+
[](https://pypi.org/project/eazydatafix/)
|
|
37
|
+
[](https://pypi.org/project/eazydatafix/)
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
[](https://pypi.org/project/eazydatafix/)
|
|
40
|
+
[](https://github.com/suneelprojects/eazydatafix/releases)
|
|
41
|
+
[](https://github.com/suneelprojects/eazydatafix)
|
|
42
|
+
|
|
43
|
+
> A modern Python library for **data quality assessment, validation, and automated data cleaning**.
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ✨ Features
|
|
50
|
+
|
|
51
|
+
- 📊 Data Quality Assessment
|
|
52
|
+
- ✅ Missing Value Detection
|
|
53
|
+
- 🔍 Duplicate Detection
|
|
54
|
+
- ✔️ Data Validation
|
|
55
|
+
- 🧹 Data Consistency Checks
|
|
56
|
+
- 🎯 Data Accuracy Checks
|
|
57
|
+
- ⏱️ Timeliness Checks
|
|
58
|
+
- 💡 Intelligent Recommendations
|
|
59
|
+
- 📄 Console Report
|
|
60
|
+
- 🌐 HTML Report
|
|
61
|
+
- 📑 PDF Report
|
|
62
|
+
- 📈 Excel Report
|
|
63
|
+
- 📋 CSV Report
|
|
64
|
+
- 📦 JSON Report
|
|
65
|
+
- 📝 Markdown Report
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# Installation
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install eazydatafix
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For Parquet support:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install eazydatafix[parquet]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
# Quick Start
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
import eazydatafix as edf
|
|
87
|
+
|
|
88
|
+
report = edf.assess("employees.csv")
|
|
89
|
+
|
|
90
|
+
report.summary()
|
|
91
|
+
|
|
92
|
+
report.to_html()
|
|
93
|
+
|
|
94
|
+
report.to_pdf()
|
|
95
|
+
|
|
96
|
+
report.to_excel()
|
|
97
|
+
|
|
98
|
+
report.to_json()
|
|
99
|
+
|
|
100
|
+
report.to_csv()
|
|
101
|
+
|
|
102
|
+
report.to_markdown()
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
# Example Console Output
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
======================================================================
|
|
111
|
+
🛠️ EASY DATA FIX REPORT
|
|
112
|
+
======================================================================
|
|
113
|
+
|
|
114
|
+
Overall Score : 90.37
|
|
115
|
+
|
|
116
|
+
Grade : A
|
|
117
|
+
|
|
118
|
+
Completeness : 96.97%
|
|
119
|
+
|
|
120
|
+
Uniqueness : 100.00%
|
|
121
|
+
|
|
122
|
+
Validity : 55.00%
|
|
123
|
+
|
|
124
|
+
Consistency : 100.00%
|
|
125
|
+
|
|
126
|
+
Accuracy : 100.00%
|
|
127
|
+
|
|
128
|
+
Timeliness : 100.00%
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
# Supported Quality Dimensions
|
|
134
|
+
|
|
135
|
+
| Dimension | Status |
|
|
136
|
+
|-----------|--------|
|
|
137
|
+
| Completeness | ✅ |
|
|
138
|
+
| Uniqueness | ✅ |
|
|
139
|
+
| Validity | ✅ |
|
|
140
|
+
| Consistency | ✅ |
|
|
141
|
+
| Accuracy | ✅ |
|
|
142
|
+
| Timeliness | ✅ |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
# Report Formats
|
|
147
|
+
|
|
148
|
+
EasyDataFix can generate reports in multiple formats.
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
report.summary()
|
|
152
|
+
|
|
153
|
+
report.to_html()
|
|
154
|
+
|
|
155
|
+
report.to_pdf()
|
|
156
|
+
|
|
157
|
+
report.to_excel()
|
|
158
|
+
|
|
159
|
+
report.to_json()
|
|
160
|
+
|
|
161
|
+
report.to_csv()
|
|
162
|
+
|
|
163
|
+
report.to_markdown()
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
# Supported Data Sources
|
|
169
|
+
|
|
170
|
+
EasyDataFix accepts datasets in a variety of formats. `edf.assess(...)` and `edf.fix(...)` both work with:
|
|
171
|
+
|
|
172
|
+
- Pandas `DataFrame`
|
|
173
|
+
- CSV files
|
|
174
|
+
- Excel files (`.xlsx` / `.xls`)
|
|
175
|
+
- JSON files
|
|
176
|
+
- Parquet files
|
|
177
|
+
|
|
178
|
+
Loading is handled by the modular `eazydatafix.datasources` package, which lets you plug in your own formats:
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
import pandas as pd
|
|
182
|
+
|
|
183
|
+
from eazydatafix.datasources import (
|
|
184
|
+
DataSource,
|
|
185
|
+
DatasetLoader,
|
|
186
|
+
default_registry,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class TSVDataSource(DataSource):
|
|
191
|
+
|
|
192
|
+
name = "tsv"
|
|
193
|
+
|
|
194
|
+
def can_load(self, source) -> bool:
|
|
195
|
+
from pathlib import Path
|
|
196
|
+
return isinstance(source, Path) and source.suffix.lower() == ".tsv"
|
|
197
|
+
|
|
198
|
+
def load(self, source) -> pd.DataFrame:
|
|
199
|
+
return pd.read_csv(source, sep="\t")
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
default_registry.register(TSVDataSource())
|
|
203
|
+
|
|
204
|
+
# Now edf.assess(...) and edf.fix(...) accept .tsv files too.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
# Why EazyDataFix?
|
|
210
|
+
|
|
211
|
+
EazyDataFix is designed to make data quality assessment simple and accessible.
|
|
212
|
+
|
|
213
|
+
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.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
# Roadmap
|
|
218
|
+
|
|
219
|
+
### Version 0.1
|
|
220
|
+
|
|
221
|
+
- Assessment Engine
|
|
222
|
+
- Validation Engine
|
|
223
|
+
- Recommendation Engine
|
|
224
|
+
- Reporting Engine
|
|
225
|
+
- Auto Fix Foundation
|
|
226
|
+
|
|
227
|
+
### Version 0.2
|
|
228
|
+
|
|
229
|
+
- Data Profiling
|
|
230
|
+
- CLI Support
|
|
231
|
+
- Streamlit Dashboard
|
|
232
|
+
- SQL Support
|
|
233
|
+
- Apache Spark Support
|
|
234
|
+
- Interactive Charts
|
|
235
|
+
- AI Recommendations
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
# Contributing
|
|
240
|
+
|
|
241
|
+
Contributions are welcome.
|
|
242
|
+
|
|
243
|
+
Feel free to fork the repository, open issues, or submit pull requests.
|
|
244
|
+
|
|
245
|
+
Repository:
|
|
246
|
+
|
|
247
|
+
https://github.com/suneelprojects/eazydatafix
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
# License
|
|
252
|
+
|
|
253
|
+
MIT License
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
Made with ❤️ by **Suneel Kumar Kola**
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# 🛠️ EazyDataFix
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/eazydatafix/)
|
|
4
|
+
[](https://pypi.org/project/eazydatafix/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://pypi.org/project/eazydatafix/)
|
|
7
|
+
[](https://github.com/suneelprojects/eazydatafix/releases)
|
|
8
|
+
[](https://github.com/suneelprojects/eazydatafix)
|
|
9
|
+
|
|
10
|
+
> A modern Python library for **data quality assessment, validation, and automated data cleaning**.
|
|
11
|
+
|
|
12
|
+
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.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ✨ Features
|
|
17
|
+
|
|
18
|
+
- 📊 Data Quality Assessment
|
|
19
|
+
- ✅ Missing Value Detection
|
|
20
|
+
- 🔍 Duplicate Detection
|
|
21
|
+
- ✔️ Data Validation
|
|
22
|
+
- 🧹 Data Consistency Checks
|
|
23
|
+
- 🎯 Data Accuracy Checks
|
|
24
|
+
- ⏱️ Timeliness Checks
|
|
25
|
+
- 💡 Intelligent Recommendations
|
|
26
|
+
- 📄 Console Report
|
|
27
|
+
- 🌐 HTML Report
|
|
28
|
+
- 📑 PDF Report
|
|
29
|
+
- 📈 Excel Report
|
|
30
|
+
- 📋 CSV Report
|
|
31
|
+
- 📦 JSON Report
|
|
32
|
+
- 📝 Markdown Report
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install eazydatafix
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For Parquet support:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install eazydatafix[parquet]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
# Quick Start
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import eazydatafix as edf
|
|
54
|
+
|
|
55
|
+
report = edf.assess("employees.csv")
|
|
56
|
+
|
|
57
|
+
report.summary()
|
|
58
|
+
|
|
59
|
+
report.to_html()
|
|
60
|
+
|
|
61
|
+
report.to_pdf()
|
|
62
|
+
|
|
63
|
+
report.to_excel()
|
|
64
|
+
|
|
65
|
+
report.to_json()
|
|
66
|
+
|
|
67
|
+
report.to_csv()
|
|
68
|
+
|
|
69
|
+
report.to_markdown()
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# Example Console Output
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
======================================================================
|
|
78
|
+
🛠️ EASY DATA FIX REPORT
|
|
79
|
+
======================================================================
|
|
80
|
+
|
|
81
|
+
Overall Score : 90.37
|
|
82
|
+
|
|
83
|
+
Grade : A
|
|
84
|
+
|
|
85
|
+
Completeness : 96.97%
|
|
86
|
+
|
|
87
|
+
Uniqueness : 100.00%
|
|
88
|
+
|
|
89
|
+
Validity : 55.00%
|
|
90
|
+
|
|
91
|
+
Consistency : 100.00%
|
|
92
|
+
|
|
93
|
+
Accuracy : 100.00%
|
|
94
|
+
|
|
95
|
+
Timeliness : 100.00%
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Supported Quality Dimensions
|
|
101
|
+
|
|
102
|
+
| Dimension | Status |
|
|
103
|
+
|-----------|--------|
|
|
104
|
+
| Completeness | ✅ |
|
|
105
|
+
| Uniqueness | ✅ |
|
|
106
|
+
| Validity | ✅ |
|
|
107
|
+
| Consistency | ✅ |
|
|
108
|
+
| Accuracy | ✅ |
|
|
109
|
+
| Timeliness | ✅ |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
# Report Formats
|
|
114
|
+
|
|
115
|
+
EasyDataFix can generate reports in multiple formats.
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
report.summary()
|
|
119
|
+
|
|
120
|
+
report.to_html()
|
|
121
|
+
|
|
122
|
+
report.to_pdf()
|
|
123
|
+
|
|
124
|
+
report.to_excel()
|
|
125
|
+
|
|
126
|
+
report.to_json()
|
|
127
|
+
|
|
128
|
+
report.to_csv()
|
|
129
|
+
|
|
130
|
+
report.to_markdown()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
# Supported Data Sources
|
|
136
|
+
|
|
137
|
+
EasyDataFix accepts datasets in a variety of formats. `edf.assess(...)` and `edf.fix(...)` both work with:
|
|
138
|
+
|
|
139
|
+
- Pandas `DataFrame`
|
|
140
|
+
- CSV files
|
|
141
|
+
- Excel files (`.xlsx` / `.xls`)
|
|
142
|
+
- JSON files
|
|
143
|
+
- Parquet files
|
|
144
|
+
|
|
145
|
+
Loading is handled by the modular `eazydatafix.datasources` package, which lets you plug in your own formats:
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
import pandas as pd
|
|
149
|
+
|
|
150
|
+
from eazydatafix.datasources import (
|
|
151
|
+
DataSource,
|
|
152
|
+
DatasetLoader,
|
|
153
|
+
default_registry,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class TSVDataSource(DataSource):
|
|
158
|
+
|
|
159
|
+
name = "tsv"
|
|
160
|
+
|
|
161
|
+
def can_load(self, source) -> bool:
|
|
162
|
+
from pathlib import Path
|
|
163
|
+
return isinstance(source, Path) and source.suffix.lower() == ".tsv"
|
|
164
|
+
|
|
165
|
+
def load(self, source) -> pd.DataFrame:
|
|
166
|
+
return pd.read_csv(source, sep="\t")
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
default_registry.register(TSVDataSource())
|
|
170
|
+
|
|
171
|
+
# Now edf.assess(...) and edf.fix(...) accept .tsv files too.
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
# Why EazyDataFix?
|
|
177
|
+
|
|
178
|
+
EazyDataFix is designed to make data quality assessment simple and accessible.
|
|
179
|
+
|
|
180
|
+
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.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
# Roadmap
|
|
185
|
+
|
|
186
|
+
### Version 0.1
|
|
187
|
+
|
|
188
|
+
- Assessment Engine
|
|
189
|
+
- Validation Engine
|
|
190
|
+
- Recommendation Engine
|
|
191
|
+
- Reporting Engine
|
|
192
|
+
- Auto Fix Foundation
|
|
193
|
+
|
|
194
|
+
### Version 0.2
|
|
195
|
+
|
|
196
|
+
- Data Profiling
|
|
197
|
+
- CLI Support
|
|
198
|
+
- Streamlit Dashboard
|
|
199
|
+
- SQL Support
|
|
200
|
+
- Apache Spark Support
|
|
201
|
+
- Interactive Charts
|
|
202
|
+
- AI Recommendations
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
# Contributing
|
|
207
|
+
|
|
208
|
+
Contributions are welcome.
|
|
209
|
+
|
|
210
|
+
Feel free to fork the repository, open issues, or submit pull requests.
|
|
211
|
+
|
|
212
|
+
Repository:
|
|
213
|
+
|
|
214
|
+
https://github.com/suneelprojects/eazydatafix
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
# License
|
|
219
|
+
|
|
220
|
+
MIT License
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
Made with ❤️ by **Suneel Kumar Kola**
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from .assessment.engine import AssessmentEngine
|
|
2
|
+
from .assessment.profiler import DatasetProfiler
|
|
3
|
+
from .console_report import Report
|
|
4
|
+
from .fix.engine import FixEngine
|
|
5
|
+
from .models.fix_config import FixConfig
|
|
6
|
+
from .prepare.engine import PrepareEngine
|
|
7
|
+
|
|
8
|
+
__version__ = "0.2.0"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def profile(dataset):
|
|
12
|
+
"""
|
|
13
|
+
Generate a structural profile for a dataset.
|
|
14
|
+
"""
|
|
15
|
+
profiler = DatasetProfiler()
|
|
16
|
+
return profiler.profile(dataset)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def assess(dataset):
|
|
20
|
+
"""
|
|
21
|
+
Assess the quality of a dataset.
|
|
22
|
+
"""
|
|
23
|
+
engine = AssessmentEngine()
|
|
24
|
+
return engine.assess(dataset)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def fix(dataset, config: FixConfig | None = None):
|
|
28
|
+
"""
|
|
29
|
+
Automatically clean a dataset.
|
|
30
|
+
"""
|
|
31
|
+
engine = FixEngine()
|
|
32
|
+
return engine.fix(dataset, config)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def analysis_ready(
|
|
36
|
+
dataset,
|
|
37
|
+
config: FixConfig | None = None,
|
|
38
|
+
):
|
|
39
|
+
"""
|
|
40
|
+
Clean and prepare a dataset for exploratory
|
|
41
|
+
data analysis (EDA).
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
cleaned = fix(
|
|
45
|
+
dataset,
|
|
46
|
+
config=config,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
engine = PrepareEngine()
|
|
50
|
+
|
|
51
|
+
return engine.prepare(
|
|
52
|
+
cleaned.dataframe,
|
|
53
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
|
|
3
|
+
from eazydatafix.assessment.checks.accuracy.numeric_range_check import (
|
|
4
|
+
NumericRangeCheck,
|
|
5
|
+
)
|
|
6
|
+
from eazydatafix.models.validation_result import ValidationResult
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AccuracyEngine:
|
|
10
|
+
"""
|
|
11
|
+
Runs all accuracy checks.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self) -> None:
|
|
15
|
+
|
|
16
|
+
self._checks = [
|
|
17
|
+
NumericRangeCheck(),
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
def evaluate(
|
|
21
|
+
self,
|
|
22
|
+
df: pd.DataFrame,
|
|
23
|
+
) -> list[ValidationResult]:
|
|
24
|
+
|
|
25
|
+
results: list[ValidationResult] = []
|
|
26
|
+
|
|
27
|
+
for check in self._checks:
|
|
28
|
+
results.extend(
|
|
29
|
+
check.evaluate(df)
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return results
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
|
|
3
|
+
from eazydatafix.models.validation_result import ValidationResult
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class NumericRangeCheck:
|
|
7
|
+
"""
|
|
8
|
+
Detects numeric values outside acceptable ranges.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
DEFAULT_RANGES = {
|
|
12
|
+
"age": (0, 120),
|
|
13
|
+
"salary": (0, 1_000_000_000),
|
|
14
|
+
"marks": (0, 100),
|
|
15
|
+
"percentage": (0, 100),
|
|
16
|
+
"score": (0, 100),
|
|
17
|
+
"rating": (0, 5),
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
def evaluate(
|
|
21
|
+
self,
|
|
22
|
+
df: pd.DataFrame,
|
|
23
|
+
) -> list[ValidationResult]:
|
|
24
|
+
|
|
25
|
+
results: list[ValidationResult] = []
|
|
26
|
+
|
|
27
|
+
for column in df.columns:
|
|
28
|
+
|
|
29
|
+
column_name = column.lower()
|
|
30
|
+
|
|
31
|
+
if column_name not in self.DEFAULT_RANGES:
|
|
32
|
+
continue
|
|
33
|
+
|
|
34
|
+
minimum, maximum = self.DEFAULT_RANGES[column_name]
|
|
35
|
+
|
|
36
|
+
invalid = 0
|
|
37
|
+
|
|
38
|
+
numeric_values = pd.to_numeric(
|
|
39
|
+
df[column],
|
|
40
|
+
errors="coerce",
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
for value in numeric_values.dropna():
|
|
44
|
+
|
|
45
|
+
if value < minimum or value > maximum:
|
|
46
|
+
invalid += 1
|
|
47
|
+
|
|
48
|
+
if invalid == 0:
|
|
49
|
+
|
|
50
|
+
results.append(
|
|
51
|
+
ValidationResult(
|
|
52
|
+
rule="Numeric Range",
|
|
53
|
+
column=column,
|
|
54
|
+
passed=True,
|
|
55
|
+
message="All values are within the expected range.",
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
else:
|
|
60
|
+
|
|
61
|
+
results.append(
|
|
62
|
+
ValidationResult(
|
|
63
|
+
rule="Numeric Range",
|
|
64
|
+
column=column,
|
|
65
|
+
passed=False,
|
|
66
|
+
message=f"{invalid} value(s) outside the expected range.",
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return results
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
|
|
5
|
+
from eazydatafix.contracts.check import Check
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(slots=True)
|
|
9
|
+
class CompletenessResult:
|
|
10
|
+
"""
|
|
11
|
+
Represents the completeness assessment result.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
total_missing_values: int
|
|
15
|
+
completeness_score: float
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CompletenessCheck(Check):
|
|
19
|
+
"""
|
|
20
|
+
Evaluates dataset completeness.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def name(self) -> str:
|
|
25
|
+
return "Completeness"
|
|
26
|
+
|
|
27
|
+
def evaluate(self, df: pd.DataFrame) -> CompletenessResult:
|
|
28
|
+
total_cells = df.shape[0] * df.shape[1]
|
|
29
|
+
missing_values = int(df.isna().sum().sum())
|
|
30
|
+
|
|
31
|
+
score = (
|
|
32
|
+
100.0
|
|
33
|
+
if total_cells == 0
|
|
34
|
+
else ((total_cells - missing_values) / total_cells) * 100
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return CompletenessResult(
|
|
38
|
+
total_missing_values=missing_values,
|
|
39
|
+
completeness_score=round(score, 2),
|
|
40
|
+
)
|
|
File without changes
|