Import data from JSON files

Load structured data from JSON files into Pixeltable tables for processing and analysis.

Data Import/Export · 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.

How it works

You use pxt.create_table() with a source parameter to create a table from a JSON file or URL. The JSON must be an array of objects, where each object becomes a row.

What it covers

  • Import JSON files directly into tables
  • Import from URLs (APIs, remote files)
  • Handle nested JSON structures

What it uses

Install
terminal
pip install pixeltable
Pixeltable calls
pxt.create_table()add_computed_column()

A look at the code

data-import-json.ipynb
# Add a computed column combining title and author
articles.add_computed_column(
summary=articles.title + ' by ' + articles.author
)

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

Browse all 103