Custom Iterators

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

Core Operations · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

What it covers

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

What it uses

Install
terminal
pip install pixeltable
Pixeltable calls
pxt.create_table()pxt.create_view()pxt.iterator()insert()

A look at the code

custom-iterators.ipynb
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()

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103