Pandasaurus
Pandasaurus supports simple queries over ontology annotations in dataframes, powered by Ubergraph SPARQL queries. It keeps dependencies light while still offering CURIE validation, enrichment utilities, and graph exports for downstream tooling.
Features
- Validate and update seed CURIEs, catching obsoleted terms with replacement suggestions.
- Enrich seed lists via simple, minimal, full, contextual, and ancestor-based strategies.
- Build tabular outputs (
pandas.DataFrame) and transitive-reduced graphs (rdflib.Graph) for visualization. - Batched SPARQL queries and deterministic tests with built-in mocking examples.
Installation
pip install pandasaurus
or with Poetry:
poetry add pandasaurus
Requires Python 3.9–3.11.
Quick Example
from pandasaurus.curie_validator import CurieValidator
from pandasaurus.query import Query
seeds = ["CL:0000084", "CL:0000787", "CL:0000636"]
terms = CurieValidator.construct_term_list(seeds)
CurieValidator.get_validation_report(terms) # raises if invalid or obsoleted
query = Query(seeds, force_fail=True)
df = query.simple_enrichment()
print(df.head())
See the Quick Start guide for a step-by-step workflow.
Documentation
Full documentation (quick start, recipes, developer guide, and API reference) lives under docs/ and is published from the gh-pages branch:
To build docs locally:
poetry install -E docs
poetry run sphinx-build -b html docs docs/_build/html
Contributing
Pull requests are welcome! See docs/guides/contributing.rst for details on environment setup, testing, linting, and the release workflow. Pandasaurus aims to remain a small, focused library; please open an issue before introducing large new features.
Background
The first planned use case is to provide enrichment/query tooling for AnnData Cell x Gene matrices following the CZ single cell curation standard.
Metadata
Release files for pandasaurus 1.0.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 |
|---|---|---|---|---|
| pandasaurus-1.0.0.tar.gz | 17.3 kB | Without provenance | Details for pandasaurus-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandasaurus-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pandasaurus-1.0.0-py3-none-any.whl |
Total release size: 38.3 kB
Release files / pandasaurus-1.0.0.tar.gz
| Download URL | pandasaurus-1.0.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3276b8fc521246a6c9b7ba4ad2aa5bf3d4106da57dbe06be471bf51a618d201
|
|
BLAKE2b-256 checksum How to use checksums |
83ce370c1aadea3775cc31b863b62a6d9efda29e2583cb98716bed1444b5428c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pandasaurus-1.0.0-py3-none-any.whl
| Download URL | pandasaurus-1.0.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38bcb84bb529e85672c0d074ee6a8b0d4a5fee557524a4f81eefd400367a32fd
|
|
BLAKE2b-256 checksum How to use checksums |
d6c85f92e3254a6bb7039fff58755837efb94d15d919e6dab9ef4ade713e35f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for pandasaurus 1.0.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.