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__ = mappingproxy({'__module__': 'PyFoam.Basics.TableData', '__doc__': 'A simple table. Current limitiation is that column and row\n labels have to be known at creation time', '__init__': <function TableData.__init__>, 'getIndex': <function TableData.getIndex>, 'apply': <function TableData.apply>, '__getitem__': <function TableData.__getitem__>, '__setitem__': <function TableData.__setitem__>, '__str__': <function TableData.__str__>, 'min': <function TableData.min>, 'max': <function TableData.max>, 'columns': <function TableData.columns>, 'rows': <function TableData.rows>, '__dict__': <attribute '__dict__' of 'TableData' objects>, '__weakref__': <attribute '__weakref__' of 'TableData' objects>})
__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