;ò ÀlgBc@sUdkiZdklZdZdeiefd„ƒYZdefd„ƒYZdS(N(sLeafsreStructuredTextsTablecBs2tZdZd„Zeeeeded„ZRS(s&Represents a table in the object tree.cCsdS(s3 Return a table row, table slice or table column. It takes different actions depending on the type of the `key` parameter: If `key` is an integer, the corresponding table row is returned as a ``Record`` or `NestedRecord` object, whatever is more appropriate. If `key` is a slice, the row slice determined by key is returned as a ``RecArray`` or `NestedRecArray` object, whatever is more appropriate. Finally, if `key` is a string, it is interpreted as a column name in the table, and, if it is a plain field (i.e. has not a nested structure), it is read and returned as a ``NumArray`` or ``CharArray`` object (whatever is appropriate). If the column has a nested structure (nested column), it returns a `NestedRecArray`. If `key` has a ``'/'`` character on it, this is interpreted as a separator for nested fields (see examples). Example 1 --------- Get table row #0: >>> table[0] array( [(1, (0.5, 1.0), ('a1', 1j))], formats=['Int64', '(2,)Float32', ['a2', 'Complex64']], shape=1, names=['id', 'pos', ('info', ['name', 'value'])]) Example 2 --------- Get a range of rows in table: >>> table[:] array( [(1, (0.5, 1.0), ('a1', 1j)), (2, (0.0, 0.0), ('a2', 1+.1j))], formats=['Int64', '(2,)Float32', ['a2', 'Complex64']], shape=2, names=['id', 'pos', ('info', ['name', 'value'])]) Example 3 --------- Get a non-nested column: >>> table['id'] array([1, 2], type=Int64) Example 4 --------- Get a nested column: >>> table['info'] array( [('a1', 1j), ('a2', 1+.1j)], formats=['a2', 'Complex64'], shape=2, names=['info', ['name', 'value']]) Example 5 --------- Get a deeply nested column: >>> table['info/value'] array([ 0.+1.j , 1.+0.1j]) N((sselfskey((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pys __getitem__sKsnumarraycCsdS(s Read a range of rows and return an in-memory object. If `start`, `stop`, or `step` parameters are supplied, a row range is selected. If `field` is specified, this field name is returned as a ``NumArray`` object in case the column is a simple type. If `field` is a column with a type with structure (nested type), a `NestedRecArray` is returned instead. If both `field` and `flavor` are provided and `field` refers to a column with a simple type (i.e. non-nested), an additional conversion to an object of this flavor is made. `flavor` must have any of the next values: ``'numarray'``, ``'Numeric'``, ``'Tuple'`` or ``'List'``. If `field` is not supplied then all the fields are selected and a ``RecArray`` (or a `NestedRecArray`, whatever is more appropriate) is returned. If a `coords` list is specified, only the indices in `coords` that are in the range of (`start` , `stop`) are returned. `step` only can be assigned to be 1, otherwise an error is issued. Example 1 --------- Get table row #0: >>> table.read(0) array( [(1, (0.5, 1.0), ('a1', 1j))], formats=['Int64', '(2,)Float32', ['a2', 'Complex64']], shape=1, names=['id', 'pos', ('info', ['name', 'value'])]) Example 2 --------- Get a range of rows in table: >>> table.read(start=0, stop=table.nrows) array( [(1, (0.5, 1.0), ('a1', 1j)), (2, (0.0, 0.0), ('a2', 1+.1j))], formats=['Int64', '(2,)Float32', ['a2', 'Complex64']], shape=2, names=['id', 'pos', ('info', ['name', 'value'])]) Example 3 --------- Get a non-nested column: >>> table.read(field='id') array([1, 2], type=Int64) Example 4 --------- Get a nested column: >>> table.read(field='info') array( [('a1', 1j), ('a2', 1+.1j)], formats=['a2', 'Complex64'], shape=2, names=['info', ['name', 'value']]) Example 5 --------- Get a deeply nested column: >>> table.read(field='info/value') array([ 0.+1.j , 1.+0.1j]) N((sselfsstartsstopsstepsfieldsflavorscoords((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pysread]sR(s__name__s __module__s__doc__s __getitem__sNonesread(((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pysTable s  NsColscBs tZdZd„Zd„ZRS(s>Provides a natural naming and container interface for columns.cCsdS(sç Create the container to keep the column information. `table` is the parent `Table` object. This constructor creates one attribute for each column in table. If the column is non-nested, the attribute will point to a `Column` object. If the column is nested, the attribute will point to another `Cols` object. Following are some examples showing how these attributes can be used to 'fake' a natural naming when accessing nested columns. Example 1 --------- Get a non-nested column: >>> id = table.cols.id Cols(table.cols.id) >>> id[:] array([1, 2], type=Int64) Example 2 --------- Get a nested column: >>> info = table.cols.info Cols(table.cols.info) >>> info[:] array( [('a1', 1j), ('a2', 1+.1j)], formats=['a2', 'Complex64'], shape=2, names=['info', ['name', 'value']]) Example 3 --------- Get a deeply nested column: >>> value = table.cols.info.value Column(table.cols.info.value) # Note that this is plain Column! >>> value[:] array([ 0.+1.j , 1.+0.1j]) N((sselfstable((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pys__init__¶s2cCsdS(sP Returns a column row, column slice or a sub-column. It takes different actions depending on the type of the ``key parameter: If `key` is an integer, the corresponding column is returned as a ``Record`` or `NestedRecord` object, whatever is most appropriate. If `key` is a slice, the row slice determined by key is returned as a ``RecArray`` or `NestedRecArray` object, whatever is most appropriate. Finally, if `key` is a string, it is interpreted as a column name in the table, and, if it is a plain field (i.e. has not a nested structure), a `Column` object is returned. If `key` has a nested structure (nested column), it returns another `Cols` object that can be used as a container for accessing its nested columns. If `key` has a ``'/'`` character on it, this is interpreted as a separator for nested fields (see examples). Example 1 --------- Get table row #0: >>> table.cols[0] # equivalent to table[0] array( [(1, (0.5, 1.0), ('a1', 1j))], formats=['Int64', '(2,)Float32', ['a2', 'Complex64']], shape=1, names=['id', 'pos', ('info', ['name', 'value'])]) Example 2 --------- Get a non-nested column: >>> id = table.cols['id'] Cols(table.cols.id) >>> id[:] array([1, 2], type=Int64) Example 3 --------- Get a nested column: >>> info = table.cols['info'] Cols(table.cols.info) >>> info[:] array( [('a1', 1j), ('a2', 1+.1j)], formats=['a2', 'Complex64'], shape=2, names=['info', ['name', 'value']]) Example 4 --------- Get a deeply nested column (using a mix of natural naming and getitem): >>> value = table.cols.info['value'] Column(table.cols.info.value) # Note that this is plain Column! >>> value[1] (1+0.10000000000000001j) >>> value[:] array([ 0.+1.j , 1.+0.1j]) N((sselfskey((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pys __getitem__ësG(s__name__s __module__s__doc__s__init__s __getitem__(((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pysCols³s  5(stables.hdf5Extensions hdf5Extensions tables.LeafsLeafs __docformat__sTablesobjectsCols(sLeafsColss __docformat__s hdf5ExtensionsTable((sE/home/ivan/_/programari/pytables/documents/ncsa-niuat/design/Table.pys?s  ¨