---
name: tidydraws
description: >
  Use when writing Python code that uses the tidydraws package.
license: MIT
compatibility: Requires Python >=3.12.
---

# tidydraws

## Installation

```bash
pip install tidydraws
```

## API overview

### Functions

Extract and join tidy draws from ArviZ DataTrees.

- `parameter_draws`: Extract posterior draws for one or more variables into a tidy Polars DataFrame
- `prediction_draws`: Join posterior predictive draws to a covariate DataFrame
- `compare_draws`: Extract and stack draws from multiple groups (e.g., posterior and prior)

## Resources

- [Full documentation](https://drbenvincent.github.io/tidydraws/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
- [Source code](https://github.com/drbenvincent/tidydraws)
