Datasculpt
Deterministic dataset shape and semantic inference for tabular data.
The Problem
Before data can be governed, queried, or compared across systems, its structural intent must be understood. Most data systems (catalogs, semantic layers, governance engines) assume this understanding exists but don't produce it.
The Solution
Datasculpt infers and explains structural intent:
- Shape — Is this long or wide? Time in headers or rows?
- Grain — What uniquely identifies each row?
- Roles — Which columns are dimensions, measures, or keys?
What It Is Not
- Not a data catalog (produces metadata, doesn't store it)
- Not an ETL tool (analyzes structure, doesn't transform data)
- Not a semantic layer (understands layout, not meaning)
Quick Start
pip install datasculpt
from datasculpt import infer
result = infer("data.csv")
print(result.proposal.shape_hypothesis) # wide_observations
print(result.decision_record.grain.key_columns) # ['geo_id', 'sex', 'age_group']
for col in result.proposal.columns:
print(f"{col.name}: {col.role.value}")
# geo_id: dimension
# sex: dimension
# age_group: dimension
# population: measure
# unemployed: measure
Try It
🔬 Live Demo — Analyze datasets in your browser. No installation, no data leaves your machine.
Documentation
- Quickstart — First inference in 5 minutes
- Examples — See inference on different dataset shapes
- Concepts — Understand shapes, roles, and grain
- API Reference — Function signatures and types
Key Features
Five Dataset Shapes
| Shape | Description |
|---|---|
long_observations |
Rows are atomic observations |
long_indicators |
Unpivoted indicator/value pairs |
wide_observations |
Measures as columns |
wide_time_columns |
Time periods in column headers |
series_column |
Time series as arrays in cells |
Eight Column Roles
| Role | Purpose |
|---|---|
key |
Contributes to uniqueness |
dimension |
Categorical grouping |
measure |
Numeric, aggregatable |
time |
Temporal dimension |
indicator_name |
Names in unpivoted data |
value |
Values in unpivoted data |
series |
Embedded time series |
metadata |
Descriptive, non-analytical |
Deterministic Inference
Same input → same output. No LLMs, no randomness, no hidden state.
Evidence-Based
Every decision is scored and justified:
>>> result.decision_record.hypotheses
[
HypothesisScore(hypothesis=WIDE_OBSERVATIONS, score=0.72, reasons=[...]),
HypothesisScore(hypothesis=LONG_OBSERVATIONS, score=0.65, reasons=[...]),
]
Interactive Mode
Resolve ambiguity with questions:
result = infer("data.csv", interactive=True)
if result.pending_questions:
answers = {result.pending_questions[0].id: "long_indicators"}
result = apply_answers(result, answers)
Installation Options
# Core only
pip install datasculpt
# With optional adapters
pip install datasculpt[frictionless] # Schema validation
pip install datasculpt[dataprofiler] # Statistical profiling
pip install datasculpt[all] # Everything
Requirements
- Python 3.11+
- pandas 2.0+
Development
# Install with dev dependencies
make install-dev
# Run tests
make test
# Lint and format
make lint
make format
# Type checking
make typecheck
# Serve docs locally
make docs-serve
License
MIT
Metadata
Release files for datasculpt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datasculpt-0.1.0.tar.gz | 391.2 kB | Without provenance | Details for datasculpt-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasculpt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for datasculpt-0.1.0-py3-none-any.whl |
Total release size: 502.5 kB
Release files / datasculpt-0.1.0.tar.gz
| Download URL | datasculpt-0.1.0.tar.gz |
|---|---|
| Size | 391.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24ddfdfc1f19da65372ff1fc5ee51cbb03bab86356b819e90b0ceab737525528
|
|
BLAKE2b-256 checksum How to use checksums |
591f1e1f0d6dc338748234269abc96b700d511a5d456b8ed6469fe97bd0e6064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / datasculpt-0.1.0-py3-none-any.whl
| Download URL | datasculpt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 111.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff253fd5a1d0e1102dc93f9b1a61ede2cf101478e3fb041c7ab4869e1b3e7827
|
|
BLAKE2b-256 checksum How to use checksums |
c3004eb02587d2628cf12cc6841d46202c9de0eec65d41923e83a4d46454eaeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for datasculpt 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.