Francesc Altet • Ivan Vilata • Scott Prater • Vicent Mas • Tom Hedley • Antonio Valentino • Jeffrey Whitaker

PyTables User's Guide

Hierarchical datasets in Python
Release 1.2.1

Table of Contents

I
1
 1.1Main Features
 1.2The Object Tree
 
2
 2.1Installation from source
 2.1.1Prerequisites
 2.1.2PyTables package installation
 2.2Binary installation (Windows)
 2.2.1Windows prerequisites
 2.2.2PyTables package installation
 
3
 3.1Getting started
 3.1.1Importing tables objects
 3.1.2Declaring a Column Descriptor
 3.1.3Creating a PyTables file from scratch
 3.1.4Creating a new group
 3.1.5Creating a new table
 3.1.6Reading (and selecting) data in a table
 3.1.7Creating new array objects
 3.1.8Closing the file and looking at its content
 3.2Browsing the object tree
 3.2.1Traversing the object tree
 3.2.2Setting and getting user attributes
 3.2.3Getting object metadata
 3.2.4Reading data from Array objects
 3.3Commiting data to tables and arrays
 3.3.1Appending data to an existing table
 3.3.2Modifying data in tables
 3.3.3Modifying data in arrays
 3.3.4And finally... how to delete rows from a table
 3.4Multidimensional table cells and automatic sanity checks
 3.4.1Shape checking
 3.4.2Field name checking
 3.4.3Data type checking
 3.5Exercising the Undo/Redo feature
 3.5.1A basic example
 3.5.2A more complete example
 3.6Using enumerated types
 3.6.1Enumerated columns
 3.6.2Enumerated arrays
 3.7Dealing with nested structures in tables
 3.7.1Nested table creation
 3.7.2Reading nested tables: introducing NestedRecArray objects
 3.7.3Using Cols accessor
 3.7.4Accessing meta-information of nested tables
 3.8Other examples in PyTables distribution
 
4
 4.1tables variables and functions
 4.1.1Global variables
 4.1.2Global functions
 4.2The File class
 4.2.1File instance variables
 4.2.2File methods
 4.2.3File special methods
 4.3The Node class
 4.3.1Node instance variables
 4.3.2Node methods
 4.4The Group class
 4.4.1Group instance variables
 4.4.2Group methods
 4.4.3Group special methods
 4.5The Leaf class
 4.5.1Leaf instance variables
 4.5.2Leaf methods
 4.6The Table class
 4.6.1Table instance variables
 4.6.2Table methods
 4.6.3Table special methods
 4.6.4The Row class
 4.7The Cols class
 4.7.1Cols instance variables
 4.7.2Cols methods
 4.8The Description class
 4.8.1Description instance variables
 4.8.2Description methods
 4.9The Column class
 4.9.1Column instance variables
 4.9.2Column methods
 4.9.3Column special methods
 4.10The Array class
 4.10.1Array instance variables
 4.10.2Array methods
 4.10.3Array special methods
 4.11The CArray class
 4.11.1CArray instance variables
 4.11.2
 4.11.3Example of use
 4.12The EArray class
 4.12.1EArray instance variables
 4.12.2EArray methods
 4.13The VLArray class
 4.13.1VLArray instance variables
 4.13.2VLArray methods
 4.13.3VLArray special methods
 4.14The UnImplemented class
 4.15The AttributeSet class
 4.15.1AttributeSet instance variables
 4.15.2AttributeSet methods
 4.16Declarative classes
 4.16.1The IsDescription class
 4.16.2The Col class and its descendants
 4.16.3The Atom class and its descendants.
 4.17Helper classes
 4.17.1The Filters class
 4.17.2The IndexProps class
 4.17.3The Index class
 4.17.4The Enum class
 
5
 5.1Informing PyTables about expected number of rows in tables
 5.2Accelerating your searches
 5.2.1In-kernel searches
 5.2.2Indexed searches
 5.3Compression issues
 5.4Shuffling (or how to make the compression process more effective)
 5.5Using Psyco
 5.6Taking the most from the node LRU cache
 5.7Selecting an User Entry Point (UEP) in your tree
 5.8Compacting your PyTables files
 
II
 
6
 6.1What is FileNode?
 6.2Finding a FileNode node
 6.3FileNode - simulating files inside PyTables
 6.3.1Creating a new file node
 6.3.2Using a file node
 6.3.3Opening an existing file node
 6.3.4Adding metadata to a file node
 6.4Complementary notes
 6.5Current limitations
 6.6FileNode module reference
 6.6.1Global constants
 6.6.2Global functions
 6.6.3The FileNode abstract class
 6.6.4The ROFileNode class
 6.6.5The RAFileNode class
 
7
 7.1What is NetCDF?
 7.2Using the tables.NetCDF module
 7.2.1Creating/Opening/Closing a tables.NetCDF file
 7.2.2Dimensions in a tables.NetCDF file
 7.2.3Variables in a tables.NetCDF file
 7.2.4Attributes in a tables.NetCDF file
 7.2.5Writing data to and retrieving data from a tables.NetCDF variable
 7.2.6Efficient compression of tables.NetCDF variables
 7.3tables.NetCDF module reference
 7.3.1Global constants
 7.3.2The NetCDFFile class
 7.3.3The NetCDFVariable class
 7.4Converting between true netCDF files and tables.NetCDF files
 7.5tables.NetCDF file structure
 7.6Sharing data in tables.NetCDF files over the internet with OPeNDAP
 7.7Differences between the Scientific.IO.NetCDF API and the tables.NetCDF API
 
III
 
A
 
B
 B.1Introduction
 B.2NestedRecArray methods
 B.3NestedRecord objects
 
C
 C.1ptdump
 C.1.1Usage
 C.1.2A small tutorial on ptdump
 C.2ptrepack
 C.2.1Usage
 C.2.2A small tutorial on ptrepack
 C.3nctoh5
 C.3.1Usage
 
D
 D.1Mandatory attributes for a File
 D.2Mandatory attributes for a Group
 D.3Mandatory attributes, storage layout and supported data types for Leaves
 D.3.1Table format
 D.3.2Array format
 D.3.3CArray format
 D.3.4EArray format
 D.3.5VLArray format