---
title: "Custom Iterators"
description: "An iterator in Pixeltable is a function that expands a single input row into multiple output rows."
url: "https://www.pixeltable.com/notebooks/custom-iterators"
updated: "2026-04-10"
---

# Custom Iterators

An iterator in Pixeltable is a function that expands a single input row into multiple output rows.

- **Type:** Notebook
- **Group:** Core Operations

## What it covers

- Parameterizing Iterators
- Validation
- Class-Based Iterators
- Unstored Columns

## What it uses

- **Install:** `pip install pixeltable`
- **Pixeltable calls:** `pxt.create_table()`, `pxt.create_view()`, `pxt.iterator()`, `insert()`

## A look at the code

```python
t = pxt.create_table('iterators_demo/images', {'image': pxt.Image})
images = [
    'https://raw.githubusercontent.com/pixeltable/pixeltable/release/docs/resources/images/000000000108.jpg',
    'https://raw.githubusercontent.com/pixeltable/pixeltable/release/docs/resources/images/000000000632.jpg',
]
t.insert({'image': image} for image in images)
t.head()
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/core/custom-iterators.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/cookbooks/core/custom-iterators
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/core/custom-iterators.ipynb
