Dataframe-agnostic Zarr storage powered by Narwhals
Project description
zarrwhals
| Package | |
| CI/CD | |
| Docs & Tools |
Dataframe-agnostic Zarr storage powered by Narwhals
Overview
Zarrwhals provides a simple API for storing DataFrames in Zarr format, using Narwhals for DataFrame interoperability. Inspired by AnnData's approach to storing obs/var DataFrames as Zarr Stores.
Quick Start
import pandas as pd
import zarrwhals as zw
# Create a DataFrame
df = pd.DataFrame({
"id": [1, 2, 3],
"name": ["Alice", "Bob", "Charlie"],
"value": [10.5, 20.3, 30.1],
"category": pd.Categorical(["A", "B", "A"])
})
# Write to Zarr
zw.to_zarr(df, "data.zarr")
# Read back
df_loaded = zw.from_zarr("data.zarr")
With Polars
import polars as pl
import zarrwhals as zw
# Write polars DataFrame
df_pl = pl.DataFrame({
"a": [1, 2, 3],
"b": ["x", "y", "z"]
})
zw.to_zarr(df_pl, "data.zarr")
# Read as pandas
df_pd = zw.from_zarr("data.zarr", backend="pandas")
# Or read back as polars
df_pl2 = zw.from_zarr("data.zarr", backend="polars")
Getting started
Please refer to the documentation, in particular, the API documentation.
Installation
You need to have Python 3.11 or newer installed on your system. If you don't have Python installed, we recommend installing uv.
There are several alternative options to install zarrwhals:
- Install the latest development version:
pip install git+https://github.com/srivarra/zarrwhals.git@main
Release notes
See the changelog.
Contact
For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.
Citation
t.b.a
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 zarrwhals-0.0.1.tar.gz.
File metadata
- Download URL: zarrwhals-0.0.1.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c73abcb10199e2e17705fb376236b4b3824f6ea8836839de6b68c70a97a52fd9
|
|
| MD5 |
c6b618163a6578ad880727f6ba4f9727
|
|
| BLAKE2b-256 |
9575dd95e87ea34fc27dd85d978a1fc145fead85a8d3d8bc027c5b37f58f913c
|
Provenance
The following attestation bundles were made for zarrwhals-0.0.1.tar.gz:
Publisher:
release.yaml on srivarra/zarrwhals
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarrwhals-0.0.1.tar.gz -
Subject digest:
c73abcb10199e2e17705fb376236b4b3824f6ea8836839de6b68c70a97a52fd9 - Sigstore transparency entry: 732171736
- Sigstore integration time:
-
Permalink:
srivarra/zarrwhals@a0a72aa6555ba6abd34b79df7494d81892f818cd -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/srivarra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a0a72aa6555ba6abd34b79df7494d81892f818cd -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarrwhals-0.0.1-py3-none-any.whl.
File metadata
- Download URL: zarrwhals-0.0.1-py3-none-any.whl
- Upload date:
- Size: 56.4 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 |
b1cc34fc90814b047254a5b2aeb9e1f2d6bae935a91297675ec0c059001636b2
|
|
| MD5 |
81f89865ba02df26a8bb417f415bab6a
|
|
| BLAKE2b-256 |
b737d4f7f4911d79ab821df455bf756dd57c00f3523b6b0fbdbed000d0581c9b
|
Provenance
The following attestation bundles were made for zarrwhals-0.0.1-py3-none-any.whl:
Publisher:
release.yaml on srivarra/zarrwhals
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarrwhals-0.0.1-py3-none-any.whl -
Subject digest:
b1cc34fc90814b047254a5b2aeb9e1f2d6bae935a91297675ec0c059001636b2 - Sigstore transparency entry: 732171738
- Sigstore integration time:
-
Permalink:
srivarra/zarrwhals@a0a72aa6555ba6abd34b79df7494d81892f818cd -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/srivarra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a0a72aa6555ba6abd34b79df7494d81892f818cd -
Trigger Event:
release
-
Statement type: