A Python package for creating automated datasheets from different data sources.
Project description
datasheet-for-dataset
Automatically create standardized documentation ("datasheets") for the datasets used in your ML projects.
Status: Early preview (v0.x). The public API is evolving and subject to change.
Features
- Focused support for tabular datasets with pandas and polars backends
- Automatic summary statistics and data quality diagnostics
- Markdown templates that combine manual answers with automated insights
- CLI and Python APIs for integrating datasheet generation into workflows
Installation
Prerequisites: Python 3.10+
Install from PyPI:
pip install datasheet-for-dataset
Install a suitable backend
To use this library correctly, install a supported backend. Currently available backends are polars (default) and pandas.
Install for development (editable) with optional dev tools:
# clone the repository
git clone https://github.com/anwielts/datasheet-for-dataset.git
cd datasheet-for-dataset
# install the package (and dev extras: pytest, ruff)
uv pip install -e ".[dev]"
Quickstart
CLI workflow
Generate a template, fill in the manual sections, and compile the final markdown datasheet:
# create an empty questionnaire
dfd template --output docs/datasheet_template.md
# after answering the questions in docs/datasheet_template.md, combine it with a dataset
dfd build \
--data data/customers.csv \
--template docs/datasheet_template.md \
--output docs/datasheet.md \
--name "Customer Churn" \
--backend auto
Python workflow
Use the programmatic API to analyse a dataframe or to build a datasheet directly from a dataset file:
import pandas as pd
from dfd import Datasheet
# Load your data
df = pd.read_csv("data/your_data.csv)
# Access automated statistics in-memory
sheet = Datasheet(data=df)
for stat in sheet.analyse():
print(stat.column_name, stat.mean_val)
# Generate a template and export a full datasheet
Datasheet.generate_template("docs/datasheet_template.md")
compiled = Datasheet.from_path(
"data/customers.csv",
backend="auto",
dataset_name="Customer Churn",
)
compiled.to_markdown(
output_path="docs/auto_datasheet.md",
template_path=None,
version="1.0",
)
Development
After setting up the project for development (see Installation), you can use the following commands:
Install uv with:
pip install uv
Lock dependencies / sync project
uv lock
uv sync
uv sync --extra dev
Building the package
uv build
Running Tests
# Run tests using hatch
uv run pytest
Code Quality with Ruff
# Check for linting issues
uv run ruff check .
# Auto-fix linting issues where possible
uv run ruff check . --fix
# Format code (optional)
uv run ruff format .
Links
- Homepage: https://github.com/anwielts/datasheet-for-dataset
- Issue tracker: https://github.com/anwielts/datasheet-for-dataset/issues
- Documentation: https://github.com/anwielts/datasheet-for-dataset/wiki
Contributing
Contributions are welcome! To contribute:
- Fork the repository and create a new branch from main.
- Set up the project locally (see Installation > development).
- Ensure code quality and tests pass:
- Lint/format:
ruff check .(and optionallyruff formatif you use Ruff formatting) - Tests:
pytest
- Lint/format:
- Open a pull request with a clear description of the change and any relevant context.
Tips:
- Keep PRs focused and small where possible.
- Add or update tests when you introduce behavior changes.
- Follow the existing code style and project conventions.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
- Homepage: https://github.com/anwielts/datasheet-for-dataset
- Issue tracker: https://github.com/anwielts/datasheet-for-dataset/issues
Contact
- Maintainers:
- anwielts — 52626848+anwielts@users.noreply.github.com
- Flippchen — 91947480+flippchen@users.noreply.github.com
For questions, ideas, or issues, please open a GitHub issue; for sensitive security concerns, consider contacting the maintainers by email.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasheet_for_dataset-0.0.6.tar.gz.
File metadata
- Download URL: datasheet_for_dataset-0.0.6.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ae20b459428977b968ea850814fe6cb622954e3d495420c3c069e5d3e90dd20
|
|
| MD5 |
f23f701643978298dc138f6e3a0f232c
|
|
| BLAKE2b-256 |
a0f034e74fa16a5e77b3351556315ae541162310f44a4d626c9343b9cd60cdfd
|
Provenance
The following attestation bundles were made for datasheet_for_dataset-0.0.6.tar.gz:
Publisher:
build_and_publish.yml on anwielts/datasheet-for-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasheet_for_dataset-0.0.6.tar.gz -
Subject digest:
9ae20b459428977b968ea850814fe6cb622954e3d495420c3c069e5d3e90dd20 - Sigstore transparency entry: 641103184
- Sigstore integration time:
-
Permalink:
anwielts/datasheet-for-dataset@2e647ae4352c6d134a7ecd7253ebb3f74022ad3d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anwielts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yml@2e647ae4352c6d134a7ecd7253ebb3f74022ad3d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file datasheet_for_dataset-0.0.6-py3-none-any.whl.
File metadata
- Download URL: datasheet_for_dataset-0.0.6-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33cad69f113eb9c99df1caec9c6052a79dff0ccb93a024151f39e7e413fc13bf
|
|
| MD5 |
65cc8fcc45bca3f589f79eec27d97a3d
|
|
| BLAKE2b-256 |
1dd0129668c854a4f585049ba372ef11e1c9bc3372069a4d955be67f63157077
|
Provenance
The following attestation bundles were made for datasheet_for_dataset-0.0.6-py3-none-any.whl:
Publisher:
build_and_publish.yml on anwielts/datasheet-for-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasheet_for_dataset-0.0.6-py3-none-any.whl -
Subject digest:
33cad69f113eb9c99df1caec9c6052a79dff0ccb93a024151f39e7e413fc13bf - Sigstore transparency entry: 641103198
- Sigstore integration time:
-
Permalink:
anwielts/datasheet-for-dataset@2e647ae4352c6d134a7ecd7253ebb3f74022ad3d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anwielts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yml@2e647ae4352c6d134a7ecd7253ebb3f74022ad3d -
Trigger Event:
workflow_dispatch
-
Statement type: