Table — Data Table Class

class pylam.base.Table(data_in=None, props=None)[source]

A class to store, write to file, or manage a 2D data table.

Parameters:
  • data_in (numpy.ndarray) – 2D numpy array
  • props (list) – list of properties as strings
addData(data_in)[source]

Populate or extend the data table.

The input have to be a 2-dimensional (m,n) numpy array, according to the convention, stored m rows of n columns.

Parameters:data – 2D numpy array
setProperties(props)[source]

Set the name of the columns by a list of strings.

Parameters:props (list) – list of properties as strings
write(filename)[source]

Writes the whole table to a file.

Parameters:filename (str) – output file name
shape

Tuple of table dimensions, like (100,5) for a table containing 100 rows and 5 columns.

array

Returns the data as a 2D numpy array,