> Every page of the ganymede website is listed in https://eugo.io/docs/ganymede/llms.txt.

# Ray Data

> Ray Data in ganymede. Distributed datasets: read, transform, aggregate, write.

Web page: https://eugo.io/docs/ganymede/ray_patterns/data/

Distributed datasets: read, transform, aggregate, write.

This section holds 12 notebooks from [`ray_patterns/data/`](https://github.com/eugo-inc/ganymede/tree/main/ray_patterns/data) in the ganymede repository. Each page shows the notebook as committed; the links under a page's title download the `.ipynb` or open it on GitHub.

## Notebooks

- [Ray Data: range, map\_batches, count](https://eugo.io/docs/ganymede/ray_patterns/data/15_data-pipeline/): A three-step Ray Data pipeline: create a dataset, transform it in batches, and count the rows.
- [Ray Data: write Parquet](https://eugo.io/docs/ganymede/ray_patterns/data/16_data-write-parquet/): Writes a dataset to a Parquet directory with SaveMode.OVERWRITE, so re-running the cell replaces the output.
- [Ray Data: groupby and aggregate](https://eugo.io/docs/ganymede/ray_patterns/data/17_data-groupby-aggregate/): Groups rows by a key and computes Count and Sum per group with Ray Data built-in aggregations.
- [Ray Data: computed columns and expression filters](https://eugo.io/docs/ganymede/ray_patterns/data/18_data-expressions/): with_column adds a computed column from col() and lit() expressions, and filter(expr=...) keeps the matching rows, with no Python UDF.
- [Ray Data: join two datasets](https://eugo.io/docs/ganymede/ray_patterns/data/19_data-join/): An inner join of two datasets on an id column. The second dataset is wired into the join node's right input.
- [Ray Data: train/test split](https://eugo.io/docs/ganymede/ray_patterns/data/20_data-train-test-split/): train_test_split has two outputs; each one feeds its own count. The builder names the two datasets for you.
- [Ray Data: batch inference with an actor pool](https://eugo.io/docs/ganymede/ray_patterns/data/21_data-actor-pool-batch-inference/): map_batches with a callable class and ActorPoolStrategy: each actor runs the expensive setup once and then processes many batches.
- [Ray Data: shuffle, repartition and sort](https://eugo.io/docs/ganymede/ray_patterns/data/22_data-shuffle-repartition-sort/): A seeded random_shuffle, a repartition into four blocks and a descending sort, then take(5).
- [Ray Data: from pandas and back](https://eugo.io/docs/ganymede/ray_patterns/data/23_data-pandas-roundtrip/): Turns a pandas DataFrame into a Ray Dataset, adds a column row by row with map, and collects the result as a DataFrame again.
- [Ray Data: fit a StandardScaler preprocessor](https://eugo.io/docs/ganymede/ray_patterns/data/24_data-preprocessor/): A Ray Data preprocessor learns column statistics in one pass (fit) and applies them (transform).
- [Ray Data: read a catalog table](https://eugo.io/docs/ganymede/ray_patterns/data/25_data-catalog-table/): A catalog node creates a DatabricksUnityCatalog client from an environment variable; the reader resolves the table through it.
- [Ray Data: batch LLM inference](https://eugo.io/docs/ganymede/ray_patterns/data/26_data-llm-batch/): The llm transform builds a ray.data.llm processor around a vLLM engine and runs prompts through it as a dataset stage.
