Francesc Alted • Scott Prater

`PyTables` User's Guide

Hierarchical datasets in Python
Release 0.8.1
All rights reserved.
© 2002, 2003, 2004 Francesc Alted

# Table of Contents

1 | Introduction
| 1.1 | Main Features
| 1.2 | The Object Tree
2 | Installation
| 2.1 | Installation from source
| 2.1.1 | Prerequisites
| 2.1.2 | `PyTables` package installation
| 2.2 | Binary installation (Windows)
| 2.2.1 | Windows prerequisites
| 2.2.2 | `PyTables` package installation
3 | Tutorials
| 3.1 | Getting started
| 3.1.1 | Importing `tables` objects
| 3.1.2 | Declaring a Column Descriptor
| 3.1.3 | Creating a `PyTables` file from scratch
| 3.1.4 | Creating a new group
| 3.1.5 | Creating a new table
| 3.1.6 | Reading (and selecting) data in a table
| 3.1.7 | Creating new array objects
| 3.1.8 | Closing the file and looking at its content
| 3.2 | Browsing the object tree and appending to tables
| 3.2.1 | Traversing the object tree
| 3.2.2 | Setting and getting user attributes
| 3.2.3 | Getting object metadata
| 3.2.4 | Reading data from `Array` objects
| 3.2.5 | Appending data to an existing table
| 3.2.6 | And finally... how to delete rows from a table
| 3.3 | Multidimensional table cells and automatic sanity checks
| 3.3.1 | Shape checking
| 3.3.2 | Field name checking
| 3.3.3 | Data type checking
4 | Library Reference
| 4.1 | `tables` variables and functions
| 4.1.1 | Global variables
| 4.1.2 | Global functions
| 4.2 | The `File` class
| 4.2.1 | `File` instance variables
| 4.2.2 | `File` methods
| 4.2.3 | `File` special methods
| 4.3 | The `Group` class
| 4.3.1 | `Group` instance variables
| 4.3.2 | `Group` methods
| 4.3.3 | `Group` special methods
| 4.4 | The `Leaf` class
| 4.4.1 | `Leaf` instance variables
| 4.4.2 | `Leaf` methods
| 4.5 | The `Table` class
| 4.5.1 | `Table` instance variables
| 4.5.2 | `Table` methods
| 4.5.3 | `Table` special methods
| 4.5.4 | The `Row` class
| 4.5.5 | The `Cols` class
| 4.5.6 | The `Column` class
| 4.6 | The `Array` class
| 4.6.1 | `Array` instance variables
| 4.6.2 | `Array` methods
| 4.6.3 | `Array` special methods
| 4.7 | The `EArray` class
| 4.7.1 | `EArray` instance variables
| 4.7.2 | `EArray` methods
| 4.8 | The `VLArray` class
| 4.8.1 | `VLArray` instance variables
| 4.8.2 | `VLArray` methods
| 4.8.3 | `VLArray` special methods
| 4.9 | The `UnImplemented` class
| 4.10 | The `AttributeSet` class
| 4.10.1 | `AttributeSet` instance variables
| 4.10.2 | `AttributeSet` methods
| 4.11 | Declarative classes
| 4.11.1 | The `IsDescription` class
| 4.11.2 | The `Col` class and its descendants
| 4.11.3 | The `Atom` class and its descendants.
| 4.12 | Helper classes
| 4.12.1 | The `Filters` class
5 | Optimization tips
| 5.1 | Taking advantage of Psyco
| 5.2 | Compression issues
| 5.3 | Shuffling (or how to make the compression process more effective)
| 5.4 | Informing `PyTables` about expected number of rows in tables
| 5.5 | Selecting an User Entry Point (UEP) in your tree
| 5.6 | Compacting your `PyTables` files
A | Supported data types in `PyTables`
B | `PyTables` File Format
| B.1 | Mandatory attributes for a `File`
| B.2 | Mandatory attributes for a `Group`
| B.3 | Mandatory attributes, storage layout and supported datatypes for `Leaves`
| B.3.1 | `Table` format
| B.3.2 | `Array` format
| B.3.3 | `EArray` format
| B.3.4 | `VLArray` format
C | Utilities
| C.1 | ptdump
| C.1.1 | Usage
| C.1.2 | A small tutorial on `ptdump`
| C.2 | ptrepack
| C.2.1 | Usage
| C.2.2 | A small tutorial on `ptrepack`