Create custom aggregate functions (UDAs)

Build reusable aggregation logic for group-by queries and analytics.

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

  • Define a UDA (User-Defined Aggregate) with the @pxt.uda decorator
  • Use UDAs in group_by queries
  • Create UDAs with multiple inputs

What it uses

Install
terminal
pip install pixeltable
Pixeltable calls
pxt.create_table()@pxt.udainsert()group_by()
Browse all 103