skillfed

anndata

Annotated data.

anndata v0.13.2 1.8M downloads/30d#3,528 on PyPI764
Permissive license BSD-3-Clause Active released

What it is and what it does

anndata is a Python library for storing and manipulating annotated data matrices—arrays with associated metadata, observations, and variables. It sits between pandas DataFrames and xarray Datasets, designed to handle scientific data efficiently whether in memory or on disk. The package supports sparse matrices, lazy operations, and multiple storage backends including HDF5 and Zarr, making it suitable for datasets that range from small in-memory arrays to larger disk-backed collections.

The library was originally built for Scanpy, a single-cell analysis toolkit, but has become a general-purpose container for annotated matrices across bioinformatics and other scientific domains. It depends on numpy, pandas, scipy, h5py, zarr, and several utility packages, giving it a stable foundation in the scientific Python ecosystem. The package is actively maintained as part of the scverse project and fiscally sponsored by NumFOCUS.

Use it for:

  • Store and manipulate single-cell RNA-seq data with cell metadata and gene annotations.
  • Work with large sparse matrices that don't fit efficiently in pandas or numpy alone.
  • Persist annotated datasets to disk in HDF5 or Zarr format for reproducible analysis.
  • Build data pipelines that combine in-memory and disk-backed operations with lazy loading.
  • Integrate with Scanpy or other scverse tools for downstream bioinformatics workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

anndata handles annotated data matrices in memory and on disk with sparse data support, lazy operations, and efficient storage—positioned as a middle ground between pandas and xarray for scientific data.

Yes. anndata is actively maintained, has no known vulnerabilities, low install friction, and fills a genuine need for annotated matrix storage in scientific Python. Its BSD-3-Clause permissive license poses no restriction. Install it if you work with structured scientific data—especially single-cell omics—or need sparse matrix support with metadata. The Python 3.12 or later requirement is a minor constraint for modern projects.

Install

anndata on PyPI

pip

pip install anndata

uv

uv add anndata

poetry

poetry add anndata

Installing anndata

Before you install

Low install friction; pure Python wheel with 11 runtime dependencies including numpy, pandas, scipy, and zarr. Active maintenance with a release 32 days ago and ongoing commits.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions—standard for scientific Python packages.

Quickstart

pip install anndata

import anndata
import numpy as np

X = np.random.randn(10, 5)
adata = anndata.AnnData(X=X)
adata.write_h5ad('data.h5ad')

Requires Python 3.12 or later.

Verify before relying

  • Performance characteristics and scalability limits for terabyte-scale datasets mentioned in description.
  • Specific lazy-loading behavior and memory footprint compared to alternatives.
  • Integration depth with annbatch for minibatch data loading workflows.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 11 — array-api-compat, h5py, legacy-api-wrap, natsort, numpy, packaging, pandas, scipy, scverse-misc, typing-extensions, zarr
Maintenance actively maintained — 32 days since the last release
Last repo commit
First released
Downloads 1,812,748/month — #3,528 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: anndata-0.13.2-py3-none-any.whl

Environment :: ConsoleFramework :: JupyterIntended Audience :: DevelopersIntended Audience :: Science/ResearchNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: Visualization

Tags

annotated data matrix storagesparse matrix handling pythonlazy loading scientific datah5ad file formatsingle-cell data structure
bioinformaticssparse-matricesdata-containers

More Visualization packages