Tables and Data Operations

Create and manage tables, insert, update and delete data, and filter and select rows with where(), select() and order_by().

Tutorials · 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

  • Create and manage tables: Understand Pixeltable's table structure, create and modify tables, and work with table schemas
  • Manipulate data: Insert, update, and delete data within tables, and retrieve data from tables into Python variables
  • Filter and select data: Use where(), select(), and order_by() to query for specific rows and columns
  • Import data from CSV files and other file types

What it uses

Install
terminal
pip install pixeltable
Pixeltable calls
pxt.create_table()insert()add_column()update()revert()

A look at the code

tables-and-data-operations.ipynb
films_t = pxt.create_table(
'fundamentals/films',
{'film_name': pxt.String, 'year': pxt.Int, 'revenue': pxt.Float},
)

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

Browse all 103
  • Computed Columns

    This guide introduces one of Pixeltable's most essential and powerful concepts: computed columns.

    Updated Open in Colab
  • 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.

    Updated Open in Colab
  • Embedding Indices

    Create an embedding index, query it with similarity search and keep it current as data changes. Covers several indexes on one column, custom embedding UDFs and precomputed embeddings.

    Updated Open in Colab