---
title: "UDFs in Pixeltable"
description: "Pixeltable comes with a library of built-in functions and integrations, but sooner or later, you'll want to introduce some customized logic into your workflow."
url: "https://www.pixeltable.com/notebooks/udfs-in-pixeltable"
updated: "2026-09-03"
---

# UDFs in Pixeltable

Pixeltable comes with a library of built-in functions and integrations, but sooner or later, you'll want to introduce some customized logic into your workflow.

- **Type:** Notebook
- **Group:** Tutorials

## What it covers

- What is a UDF?
- Types in UDFs
- Local and module UDFs
- Batching
- UDAs (aggregate UDFs)

## What it uses

- **Install:** `pip install pixeltable`
- **Pixeltable calls:** `pxt.create_table()`, `@pxt.udf`, `pxt.udf()`, `@pxt.uda`, `insert()`, `add_computed_column()`, `group_by()`

## A look at the code

```python
t.add_computed_column(
    longest_word_2=longest_word(t.input, strip_punctuation=True)
)
t.show()
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/platform/udfs-in-pixeltable.ipynb
- **Docs page:** https://docs.pixeltable.com/platform/udfs-in-pixeltable
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/platform/udfs-in-pixeltable.ipynb
