Biogeme: Python Library
2.5
|
meta iterators are designed to iterate on group of rows of the data file. More...
Public Member Functions | |
def | __init__ (self, iteratorName, name, child, variable) |
Public Member Functions inherited from bio_iterator.iterator | |
def | __init__ (self, iteratorName, name, child, variable) |
def | __str__ (self) |
Public Attributes | |
type | |
Public Attributes inherited from bio_iterator.iterator | |
iteratorName | |
name | |
child | |
variable | |
meta iterators are designed to iterate on group of rows of the data file.
They are typically used for panel data, where several rows correspond to the same individual. In the example represented in the table below, the meta iterator will identify 4 groups of data: rows 1 to 4, rows 5 to 7, rows 8 to 9 and rows 10 to 11. Note that group 1 and group 4 share the same Id. But the iterator does not take this into account, as only changes of the value of the identifier characterize a change of group. If rows 10 and 11 indeed belong to group 1, the data file must be edited so that they appear directly after row 4.
An example of iterator on this data is
Definition at line 76 of file bio_iterator.py.
def bio_iterator.metaIterator.__init__ | ( | self, | |
iteratorName, | |||
name, | |||
child, | |||
variable | |||
) |
iteratorName | Name of the iterator. |
name | Name of the set of data that is being iterated. It is either the name of a metaiterator, or the string dataFile, when the iterator spans the entire database. |
child | Name of the child |
variable | Variable that contains the ID of the elements being iterated. |
Definition at line 81 of file bio_iterator.py.