Pure Rust SPSS .sav/.zsav reader with Polars DataFrame output
Project description
ambers
Pure Rust SPSS .sav/.zsav reader — Arrow-native, zero C dependencies.
Features
- Read
.sav(bytecode) and.zsav(zlib) files - Arrow
RecordBatchoutput — zero-copy to Polars, DataFusion, DuckDB - Rich metadata: variable labels, value labels, missing values, MR sets, measure levels
- 2–3x faster than pyreadstat
- Python + Rust dual API from a single crate
Installation
Python:
pip install ambers
Rust:
cargo add ambers
Quick Start
Python
import ambers as am
# Read data + metadata
df, meta = am.read_sav("survey.sav")
# Explore metadata
meta.summary()
meta.describe("Q1")
meta.value("Q1")
# Read metadata only (fast, skips data)
meta = am.read_sav_metadata("survey.sav")
Rust
use ambers::{read_sav, read_sav_metadata};
// Read data + metadata
let (batch, meta) = read_sav("survey.sav")?;
println!("{} rows, {} cols", batch.num_rows(), meta.number_columns);
// Read metadata only
let meta = read_sav_metadata("survey.sav")?;
println!("{}", meta.label("Q1").unwrap_or("(no label)"));
Metadata API (Python)
| Method | Description |
|---|---|
meta.summary() |
Formatted overview: file info, type distribution, annotations |
meta.describe("Q1") |
Deep-dive into a single variable (or list of variables) |
meta.diff(other) |
Compare two metadata objects, returns MetaDiff |
meta.label("Q1") |
Variable label |
meta.value("Q1") |
Value labels dict |
meta.format("Q1") |
SPSS format string (e.g. "F8.2", "A50") |
meta.measure("Q1") |
Measurement level ("nominal", "ordinal", "scale") |
meta.schema |
Full metadata as a nested Python dict |
All variable-name methods raise KeyError for unknown variables.
Streaming Reader (Rust)
let mut scanner = ambers::scan_sav("survey.sav")?;
scanner.select(&["age", "gender"])?;
scanner.limit(1000);
while let Some(batch) = scanner.next_batch()? {
println!("Batch: {} rows", batch.num_rows());
}
Performance
| File | Size | Rows | Cols | ambers | pyreadstat | Speedup |
|---|---|---|---|---|---|---|
| survey_medium.sav | 147 MB | ~22,000 | ~700 | 1.27s | 3.07s | 2.4x |
| survey_large.sav | 1.1 GB | ~80,000 | ~900 | 2.42s | 6.40s | 2.6x |
License
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 Distributions
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 ambers-0.1.5.tar.gz.
File metadata
- Download URL: ambers-0.1.5.tar.gz
- Upload date:
- Size: 63.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d88b67d78916e4111e025a2ddc9f952deb4cf20ff1e6fc6d6ab2ede946aef615
|
|
| MD5 |
847bd698f5d19b64a7368d264f4aa2ae
|
|
| BLAKE2b-256 |
94f9e3834f218330e2989df7dfdb11a5d8377ccf9a4c0a5d103dec88dbf1b9fd
|
Provenance
The following attestation bundles were made for ambers-0.1.5.tar.gz:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5.tar.gz -
Subject digest:
d88b67d78916e4111e025a2ddc9f952deb4cf20ff1e6fc6d6ab2ede946aef615 - Sigstore transparency entry: 961958102
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: ambers-0.1.5-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 748.0 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22cab359bd8586843c44ea44c2d6ecad9f3e76aac3a6d91e7d09b8b36ca3d1a1
|
|
| MD5 |
3b46e63d6de9d5ffa87aec6af1217417
|
|
| BLAKE2b-256 |
fa0cca254677d798992f1de2d5a13ffecbb03b603098c6f2c2198d9f6cd6ced9
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp314-cp314-win_amd64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp314-cp314-win_amd64.whl -
Subject digest:
22cab359bd8586843c44ea44c2d6ecad9f3e76aac3a6d91e7d09b8b36ca3d1a1 - Sigstore transparency entry: 961958173
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ambers-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 892.0 kB
- Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c119cff285c62d13d939d430b53467e8fb39d351e7cbeae3dddf15da408a85
|
|
| MD5 |
a26b7cd5b2f1cb61e05b87477ee573f0
|
|
| BLAKE2b-256 |
59e2f79fb30d04c0ca9a5ee6c5f7352a6f41e51fb23b05fcc12cd356af5d4c8d
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl -
Subject digest:
d4c119cff285c62d13d939d430b53467e8fb39d351e7cbeae3dddf15da408a85 - Sigstore transparency entry: 961958217
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: ambers-0.1.5-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 815.2 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
422df13220331d0ea52739869724a11e5e9ec401af153f1a56fe39a87d0d80f7
|
|
| MD5 |
ef3334cb69a42787facd316762003f02
|
|
| BLAKE2b-256 |
59516b3e78559f50f852eab5d4c20bfaac8ea2d1630d3c8cffe6be0b86589db5
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
422df13220331d0ea52739869724a11e5e9ec401af153f1a56fe39a87d0d80f7 - Sigstore transparency entry: 961958258
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: ambers-0.1.5-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 747.7 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c05e26bbd499b86067551b8eec39a65688b4a58cd0284c1635a5bcf438aa1c7c
|
|
| MD5 |
bd106859db3088a911984d0054a17538
|
|
| BLAKE2b-256 |
f98eca196ec733c6836f11dd1a0fdb9017f11d5c2e94cd5d95f83085c0ec4d74
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp313-cp313-win_amd64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp313-cp313-win_amd64.whl -
Subject digest:
c05e26bbd499b86067551b8eec39a65688b4a58cd0284c1635a5bcf438aa1c7c - Sigstore transparency entry: 961958289
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ambers-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 891.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7902c9214d0bb4111432811d8e18b43be5866cb98d99842a6c8c205ae404c8a
|
|
| MD5 |
8515fa357e6cf2925f036529db9bc978
|
|
| BLAKE2b-256 |
2cc230dd9320a73416a371caa77c5068878578ead47d6dfbb9405151755890a9
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl -
Subject digest:
f7902c9214d0bb4111432811d8e18b43be5866cb98d99842a6c8c205ae404c8a - Sigstore transparency entry: 961958132
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: ambers-0.1.5-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 814.9 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14598f3b8bf862d2170fcd44b923e8cc4c0460d1b625f412f2985cfcd2eec8c
|
|
| MD5 |
da9463b2bd389ddddd94b42896ae3a4f
|
|
| BLAKE2b-256 |
ad05e20e1a5ef4c9e6b105265edb4d43d22c259ba38db10fe209d4c821011a92
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
f14598f3b8bf862d2170fcd44b923e8cc4c0460d1b625f412f2985cfcd2eec8c - Sigstore transparency entry: 961958155
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: ambers-0.1.5-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 748.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e056a7e15216359ecd331c52ca0cd8e35cba23907c862a5fef1ac94f03132b63
|
|
| MD5 |
211f7884cc26c4c2dc55203deaeba8c6
|
|
| BLAKE2b-256 |
602d12a258ee6fb72a877c9d9cf4063b9c79cc4d3322149526a301c3880c447f
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp312-cp312-win_amd64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp312-cp312-win_amd64.whl -
Subject digest:
e056a7e15216359ecd331c52ca0cd8e35cba23907c862a5fef1ac94f03132b63 - Sigstore transparency entry: 961958117
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ambers-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 892.9 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2cb322527b33339df3e7a2a7fb63e89bf52ad7b2c78c57ec96fd5385d6ba8c
|
|
| MD5 |
1afa7c1d6387eeb58bfc508e2ae83e12
|
|
| BLAKE2b-256 |
d6524eb7067deb2f9593891c3e3b60bd408041ff9ed66fe5c1cefd81cc322077
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl -
Subject digest:
fc2cb322527b33339df3e7a2a7fb63e89bf52ad7b2c78c57ec96fd5385d6ba8c - Sigstore transparency entry: 961958242
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ambers-0.1.5-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: ambers-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 815.0 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acd1fc17d1776b6d601bd5d68e2fd1010e02b9484073a41ad321e0c2a0af6cb1
|
|
| MD5 |
94d241e41735ce7f9f2e8be84f002b9a
|
|
| BLAKE2b-256 |
03e0e89d82c7267bcc538e1eb63028acc6807e2b6053df47a606df264d00bbfb
|
Provenance
The following attestation bundles were made for ambers-0.1.5-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on albertxli/ambers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ambers-0.1.5-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
acd1fc17d1776b6d601bd5d68e2fd1010e02b9484073a41ad321e0c2a0af6cb1 - Sigstore transparency entry: 961958192
- Sigstore integration time:
-
Permalink:
albertxli/ambers@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/albertxli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a87ac4a3f9c0d7ddfa14952014255040a99806d -
Trigger Event:
push
-
Statement type: