Sample data for training and testing
Create training, validation, and test splits with random or stratified sampling.
Export Pixeltable tables and queries to CSV, JSON, and Apache Iceberg for spreadsheets, scripts, and the lakehouse.
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.
Pixeltable's export helpers live in the pxt.io module, one function per destination. Here's how each handles the three factors above:
export_iceberg() streams into an Apache Iceberg catalog you supply; the other two write a single file.
pip install pixeltable pyiceberg
pxt.create_table()insert()add_computed_column()images.add_computed_column(width=pxtf.image.width(images.image))images.add_computed_column(height=pxtf.image.height(images.image))images.add_computed_column(mode=pxtf.image.mode(images.image))# The derived columns we'll exportfeatures = images.select(images.label, images.width, images.height, images.mode)features.collect()
One cell of the notebook, copied as it is. Open it in Colab for the rest.
Create training, validation, and test splits with random or stratified sampling.
Load data from CSV and Excel files into Pixeltable tables for processing and analysis.
Load structured data from JSON files into Pixeltable tables for processing and analysis.
Load columnar data from Parquet files into Pixeltable tables for processing and analysis.