Skip to main content

 ____    _  _____  _    ____   ___   ____
|  _ \  / \|_   _|/ \  |  _ \ / _ \ / ___|
| | | |/ _ \ | | / _ \ | | | | | | | |
| |_| / ___ \| |/ ___ \| |_| | |_| | |___
|____/_/   \_\_/_/   \_\____/ \___/ \____|
  

The Open Source Operating System for Dataset Engineering.

📖 View Official Documentation Website

PyPI version Python Versions License: MIT

InstallWhy DATADOC?Quick StartCLI CommandsArchitecture


🚀 What is DATADOC?

DATADOC is a local-first CLI and Python library for preparing tabular data for machine learning. It profiles dataset risks, creates explainable transformation plans, and saves fitted pipelines that apply the same training-derived rules to validation, test, and inference data.

Powered by Polars, DATADOC reads CSV and Parquet files, diagnoses missing values, identifiers, schema issues, duplicates, constants, and unsafe feature types. It does not promise model improvement: optional evaluation reports the observed result against a baseline under a reproducible split.

DATADOC is NOT just another EDA (Exploratory Data Analysis) tool. It profiles data quality, lets you review a plan, fits transformations from training data, and hands you a portable artifact and Python wrapper for reuse.

⚡ The Impact: Why Industry Professionals Use DATADOC

Data Scientists and ML Engineers repeatedly rebuild the same preparation steps across projects. DATADOC turns those steps into a reviewable, reusable pipeline.

  • Save boilerplate: Review recommendations for imputing nulls, encoding categories, and optional scaling or clipping before applying them.
  • Explainable by default: The deterministic core records roles, findings, operations, protected columns, and fitted statistics in an inspectable artifact.
  • Local-first: The core package works offline. Optional ML, UI, and AI features are separate extras.
  • Optional AI planning: AI can help explain or rank a constrained plan; it is never allowed to execute arbitrary generated code.
  • Leakage-safe workflows: Fitted statistics for imputation, categorical vocabularies, clipping, and scaling are learned from training data and saved as an artifact.

📦 Installation

DATADOC is published on PyPI. You can install it globally via pip or uv:

pip install datadoc-cli

(Requires Python 3.10+)


🛠️ Quick Start (CLI)

You don't need to write a single line of Python to clean your data. Just use the CLI.

# 1. Inspect data-quality findings and column roles
datadoc profile raw_data.csv --target churn --output profile.json

# 2. Review the proposed transformations before applying them
datadoc plan raw_data.csv --target churn --output plan.json

# 3. Fit only on a training dataset, then save a reusable artifact
datadoc fit train.csv --target churn --output artifacts/churn-pipeline.json

# 4. Apply the fitted artifact to validation, test, or new data
datadoc transform validation.csv --pipeline artifacts/churn-pipeline.json --output validation-features.parquet

# 5. Optionally benchmark a safe candidate pipeline against a baseline
pip install "datadoc-cli[ml]"
datadoc evaluate train.csv --target churn --task classification

# 6. Export a small executable wrapper around the fitted artifact
datadoc export --pipeline artifacts/churn-pipeline.json --output pipeline.py

🐍 Python SDK (Library Usage)

DATADOC is also a Python library. The stable workflow is profile → plan → fit → transform; the same fitted artifact can be used in notebooks, services, and batch jobs:

from datadoc import DataDocPipeline, PipelineConfig
import polars as pl

# Fit only on the training split. The target is protected from feature transforms.
train_df = pl.read_csv("train.csv")
pipeline = DataDocPipeline(PipelineConfig(target="churn")).fit(train_df)
pipeline.save("artifacts/churn-pipeline.json")

# Transform data that was never used to fit statistics.
validation_df = pl.read_csv("validation.csv")
validation_features = pipeline.transform(validation_df)

For an observed model comparison, install the optional ML extra and call pipeline.evaluate(train_df) or datadoc evaluate. Evaluation is evidence for the declared task and split strategy; it is not a promise that cleaning always improves a model.


💻 CLI Commands Reference

Command Description
datadoc profile <file> Produces a data-quality report and confidence-scored column roles
datadoc plan <file> Outputs an explainable transformation plan without modifying data
datadoc fit <train> Learns a pipeline only from training data and saves JSON state
datadoc transform <file> Applies a saved pipeline to validation, test, or inference data
datadoc evaluate <file> Optionally compares a candidate pipeline with a baseline using leakage-aware splits
datadoc export Creates an executable wrapper for a saved pipeline artifact
datadoc run <file> Writes a profile, plan, artifact, transformed data, and lineage manifest

🧩 Architecture & Plugins

DATADOC operates as a fitted pipeline. Every transformation learns state only from training data, saves that state to JSON, and reuses it unchanged for later datasets.

Priority Plugin Action Performed
10 MissingValuePlugin Imputes missing numeric values with median, categorical with mode
20 OutlierPlugin Offers optional IQR clipping; clipping is not forced by default
30 DatetimePlugin Detects date strings and extracts year, month, day, day_of_week
40 CategoricalEncoderPlugin Encodes categories using training vocabularies and handles unseen values
45 ScalingPlugin Applies configured standard or robust scaling, fit on training data only

The fitted pipeline is the production source of truth. Plugin work should follow the lifecycle analyze → fit → transform → validate → export_code, with all learned state serializable and testable.

Want to build your own? See CONTRIBUTING.md to learn how to create and register custom plugins!


🗺️ Roadmap

  • Core Engine with plugin orchestration
  • 5 Built-in deterministic plugins
  • Stunning Rich Terminal UI
  • Pipeline export capability
  • Polars backend and local-first pipeline artifacts
  • PyPI Release (pip install datadoc-cli)
  • Constrained optional AI planning path
  • Session-scoped local FastAPI dashboard
  • Export targets for dbt and Apache Airflow
  • Local FastAPI dashboard/API companion

⚖️ License

This project is licensed under the MIT License. See LICENSE for details.

🤝 Contributing

We welcome contributions from the community! If you'd like to add a new plugin or improve the core engine, please see CONTRIBUTING.md.

Maintainers can use the 0.4.0 release checklist when preparing a tag and PyPI upload.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datadoc_cli-0.4.0.tar.gz (317.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datadoc_cli-0.4.0-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file datadoc_cli-0.4.0.tar.gz.

File metadata

  • Download URL: datadoc_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 317.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for datadoc_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a70756c4b82e38e4b1e8afdf9644f96aeda4fe012975777966f48ce6722f1005
MD5 a165a369c185cb95ff4824984bcadaa8
BLAKE2b-256 f7ca983781b3557ed17274563dd2170f57c0ad6114e36639d32e670bd73d5e85

See more details on using hashes here.

File details

Details for the file datadoc_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: datadoc_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for datadoc_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 304be6d0887196a4915bd3b943202b36f4bee634aa64852afee21a66db6aa670
MD5 6735790ce7f32081ef84782b4d68b9a2
BLAKE2b-256 ef9ba2737a1d1de7b704d36b7bdad05ed178de33ec8d73d47e632c0b9710da67

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.1

2 files

0.6.0

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page