Metadata-Version: 2.4
Name: eda-datapilot
Version: 0.2.2
Summary: DataPilot - A powerful, automated Exploratory Data Analysis (EDA) library in Python
Author-email: Sakshi Nagare <sakshinagare2112@gmail.com>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: jinja2>=3.1.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: plotly>=5.14.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: scikit-learn>=1.2.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: seaborn>=0.12.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: mypy>=1.3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=7.3.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# DataPilot

DataPilot is a Python library for automated exploratory data analysis (EDA).
It analyzes a pandas DataFrame and provides dataset summaries, missing-value
analysis, numerical and categorical statistics, duplicate detection,
correlations, outlier detection, data-quality problems, recommendations, ML
insights, visualizations, and an HTML report.

## Features

- Dataset shape, memory usage, and data-type summaries
- Missing values and duplicate-row analysis
- Numerical and categorical statistics
- Pearson, Spearman, and Kendall correlations
- IQR and Z-score outlier detection
- Data-quality alerts and preprocessing recommendations
- ML task detection, feature importance, and PCA insights
- Standalone HTML reports with interactive charts

## Requirements

- Python 3.10 or newer
- A CSV file or another dataset that can be loaded into a pandas DataFrame

## Installation

From the project directory:

```powershell
python -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
pip install -e .
```

To install the test and development dependencies as well:

```powershell
pip install -e ".[dev]"
```

## Quick Start

Create a Python file such as `analyze_data.py`:

```python
from pathlib import Path

import pandas as pd
import datapilot


df = pd.read_csv("data/dataset.csv")

# Set target to None when the dataset has no target column.
report = datapilot.analyze(df, target="target_column")

output_path = Path("reports/datapilot_report.html")
output_path.parent.mkdir(parents=True, exist_ok=True)
report.to_html(str(output_path))

print(f"Report saved to: {output_path.resolve()}")
print(f"Quality score: {report.data.get('quality_score')}")
```

Run the script from the project directory:

```powershell
python analyze_data.py
```

Open the generated `reports/datapilot_report.html` file in a browser.

To save the report and open it automatically:

```python
report.show("reports/datapilot_report.html", open_browser=True)
```

## Step-by-Step Analysis

Use `EDA` when you need individual analysis results in Python:

```python
import pandas as pd
from datapilot import EDA


df = pd.read_csv("data/dataset.csv")
eda = EDA(df, target="target_column")

summary = eda.summary()
missing = eda.missing()
numeric = eda.numeric()
categorical = eda.categorical()
duplicates = eda.duplicates()
correlation = eda.correlation()
outliers = eda.outliers()
problems = eda.problems()
recommendations = eda.recommendations()
ml_insights = eda.ml_insights()

print(summary)
print(problems)
print(recommendations)

report = eda.report()
report.to_html("reports/detailed_report.html")
```

Each analysis method returns a Python dictionary, while `report.data` contains
all results from the complete analysis.

## Configuration

Use `EDAConfig` to change sampling, thresholds, outlier detection, or report
settings:

```python
import pandas as pd
from datapilot import EDA, EDAConfig


df = pd.read_csv("data/dataset.csv")

config = EDAConfig(sample_size=10_000)
config.thresholds.high_correlation = 0.9
config.outliers.iqr_multiplier = 1.5
config.outliers.z_score_threshold = 3.0
config.report.title = "Dataset EDA Report"
config.report.theme = "light"

eda = EDA(df, target="target_column", config=config)
eda.report().to_html("reports/configured_report.html")
```

## Run the Included Demo

The included demo creates a synthetic dataset with missing values, outliers,
duplicates, categorical columns, and a target column. It writes
`DataPilot_Demo_Report.html` to the project directory.

```powershell
python examples\demo.py
```

## Run Tests

```powershell
python -m pytest
```

## Public API

The package exports the following public objects:

```python
from datapilot import EDA, EDAConfig, analyze
```

- `analyze(df, target=None)` runs a complete analysis.
- `EDA(df, target=None, config=None)` provides step-by-step analysis.
- `EDAConfig` configures thresholds, outliers, reports, and sampling.

## Project Layout

```text
datapilot/
├── datapilot/              # Library source code
│   ├── analyzer.py         # EDA and analyze APIs
│   ├── config.py           # EDAConfig and report settings
│   ├── report.py           # HTML report generation
│   └── templates/          # Report template
├── examples/demo.py        # Runnable library example
├── tests/                  # Automated tests and sample data
├── pyproject.toml          # Package metadata and dependencies
└── requirements.txt        # Runtime and test dependencies
```
