PyFoam.Basics.TableData module

A simple object for table data where data is accessed with a tuple (rowLabel,colLabel)

class PyFoam.Basics.TableData.TableData(rowLabels, columnLabels)[source]

Bases: object

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

__dict__ = dict_proxy({'getIndex': <function getIndex>, '__module__': 'PyFoam.Basics.TableData', 'rows': <function rows>, '__getitem__': <function __getitem__>, 'min': <function min>, 'max': <function max>, '__str__': <function __str__>, '__setitem__': <function __setitem__>, '__init__': <function __init__>, '__dict__': <attribute '__dict__' of 'TableData' objects>, 'apply': <function apply>, '__weakref__': <attribute '__weakref__' of 'TableData' objects>, '__doc__': 'A simple table. Current limitiation is that column and row\n labels have to be known at creation time', 'columns': <function columns>})
__getitem__(labels)[source]
Parameters:labels – tuple of the form (row,col)
__init__(rowLabels, columnLabels)[source]
Parameters:
  • rowLables – the names of the rows
  • columnLabels – the names of the columns
__module__ = 'PyFoam.Basics.TableData'
__setitem__(labels, val)[source]
Parameters:labels – tuple of the form (row,col)
__str__()[source]

The table as a restructured text object

__weakref__

list of weak references to the object (if defined)

apply(func)[source]

Return the table with a function applied to it :param func: the function to apply to each element

columns()[source]

Iterate over the column names

getIndex(labels)[source]

Return the numeric indizes for these labels

max()[source]

Return the maximum of the data in the table

min()[source]

Return the minimum of the data in the table

rows()[source]

Iterate over the row names