Package PyFoam :: Package Basics :: Module TableData :: Class TableData
[hide private]
[frames] | no frames]

Class TableData

source code

object --+
         |
        TableData

A simple table. Current limitiation is that column and row labels have to be known at creation time

Instance Methods [hide private]
 
__init__(self, rowLabels, columnLabels)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getIndex(self, labels)
Return the numeric indizes for these labels
source code
 
apply(self, func)
Return the table with a function applied to it
source code
 
__getitem__(self, labels) source code
 
__setitem__(self, labels, val) source code
 
__str__(self)
The table as a restructured text object
source code
 
min(self)
Return the minimum of the data in the table
source code
 
max(self)
Return the maximum of the data in the table
source code
 
columns(self)
Iterate over the column names
source code
 
rows(self)
Iterate over the row names
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, rowLabels, columnLabels)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • rowLables - the names of the rows
  • columnLabels - the names of the columns
Overrides: object.__init__

apply(self, func)

source code 

Return the table with a function applied to it

Parameters:
  • func - the function to apply to each element

__getitem__(self, labels)
(Indexing operator)

source code 
Parameters:
  • labels - tuple of the form (row,col)

__setitem__(self, labels, val)
(Index assignment operator)

source code 
Parameters:
  • labels - tuple of the form (row,col)

__str__(self)
(Informal representation operator)

source code 

The table as a restructured text object

Overrides: object.__str__