readfile.table

Creates a table with selected data from an ASCII table file.

Calling sequence:

> data = readfile.table(file, *optional_args)


Arguments:
file
type: string
parameter: Name of the file. File should be a table with objects of arbitrary type (same per column). If cols is specified, the file can have incomplete columns (that are not included in the columns to be read).
Optional:
cols
type: int or list of ints
default: 'all'
parameter: Column(s) to be returned. Numbering starts at 0.
delimiter
type: string
default: ''
parameter: Delimiter between columns.
exclude
type: string or list of strings, of any length
default: '#'
parameter: Characters with which all the lines to be excluded should start with. Only lines that do not start with the string(s) given by exclude will be returned. If include is set, exclude is ignored.
include
type: string or list of strings, of any length
default: None
parameter: Characters with which all the lines to be included should start with. Only lines that start with the string(s) given by include will be returned. If include is set, exclude is ignored.
return_type
type: string
default: 'numpy'
parameter: Data type to be returned. Currently, 'numpy' is the only option, which means that the array returned will be a numpy array.
types
type: type or list of types
default: float
parameter: Type(s) of the column(s) to be returned. If a list is given, it must be of the same length as cols. If only one type is provided, all columns will have the same type.


© Cristóbal Sifón Andalaft
Last Updated November 15, 2011
Home