@brief Class representing a single csv column
Used in TableConstructor to store header description and values of csv column
Definition at line 18 of file TableConstructorBase.py.
◆ __init__()
| python.TableConstructorBase.Column.__init__ |
( |
| self, |
|
|
| header = "Unknown", |
|
|
| headerDesc = "Unknown", |
|
|
| needNormalizing = False ) |
Column header
Definition at line 24 of file TableConstructorBase.py.
24 def __init__(self, header = "Unknown", headerDesc = "Unknown", needNormalizing = False):
25 '''Column header'''
26 self.header = header
27
28 '''Column description'''
29 self.headerDesc = headerDesc
30
31 '''The list storing column content'''
32 self.content = []
33
34 '''Flag if column needs normalization'''
35 self.needNormalizing = needNormalizing
36
37
◆ addValue()
| python.TableConstructorBase.Column.addValue |
( |
| self, |
|
|
| value, |
|
|
| index = -1 ) |
@brief Add value to the column
Definition at line 38 of file TableConstructorBase.py.
38 def addValue(self, value, index=-1):
39 ''' @brief Add value to the column '''
40 if index < 0 or index >= len(self.content):
41 self.content.append(value)
42 else:
43 self.content[index] += value
44
◆ getValue()
| python.TableConstructorBase.Column.getValue |
( |
| self, |
|
|
| index ) |
@brief Get value from column with given index
Definition at line 52 of file TableConstructorBase.py.
52 def getValue(self, index):
53 ''' @brief Get value from column with given index'''
54 if index >= len(self.content):
55 log.error("Index out of range")
56 return None
57 else:
58 return self.content[index]
59
60
◆ updateValue()
| python.TableConstructorBase.Column.updateValue |
( |
| self, |
|
|
| value, |
|
|
| index = -1 ) |
@brief Add value to the column
Definition at line 45 of file TableConstructorBase.py.
45 def updateValue(self, value, index=-1):
46 ''' @brief Add value to the column '''
47 if index < 0 or index >= len(self.content):
48 self.content.append(value)
49 else:
50 self.content[index] = value
51
◆ content
| list python.TableConstructorBase.Column.content = [] |
◆ header
| python.TableConstructorBase.Column.header = header |
◆ headerDesc
| python.TableConstructorBase.Column.headerDesc = headerDesc |
◆ needNormalizing
| python.TableConstructorBase.Column.needNormalizing = needNormalizing |
The documentation for this class was generated from the following file: