iode.TableLine

class iode.TableLine[source]

IODE Table line.

The following line types are defined:

  • TITLE: this is a title line. The text encoded in the first column is printed across the entire width of the table.

    A LEC form in this type of line makes no sense and is rejected by the editor.

  • CELL: this is a normal table line: the first column contains a line title, the second a LEC form which,

    once calculated for the requested periods, will provide the values for columns 2 and following in the table. In fact, both columns can be either text or a LEC form, but the point of placing a LEC form in the first column is not obvious. On the other hand, you can place two headings in both columns, or at least leave the second column empty to mark a separation in the table.

  • SEP: this type of line can contain neither text nor LEC shapes: it’s simply a dividing line in the middle of the table.

  • FILES: when printed, this line will contain the names of files containing printed data extending across the entire

    width of the table. If several files are printed in comparison, this line is automatically multiplied. No data (text or LEC) can be encoded in the columns of this line type.

  • MODE: this is a line which depends on the period operations performed when the table is printed.

    For example, if a column is printed as a growth rate, a carry forward will be indicated in the line corresponding to MODE. No data can be encoded in columns of this type.

  • DATE: a line of this type will contain the date on which the table was printed.

Attributes:
line_type: TableLineType

Type of the table line. Possible values are TITLE, CELL, SEP, MODE, FILES or DATE.

graph_type: TableGraphType

Graph type associated with the table line. Possible values are LINE, SCATTER or BAR.

axis_left: bool

Indicate whether the y-axis should be on the left (True) or on the right (False) of the chart. Defaults to True (left).

Methods

from_cython_obj

See also

TableCell
Table

Examples

>>> from iode import SAMPLE_DATA_DIR
>>> from iode import tables, Table
>>> tables.load(f"{SAMPLE_DATA_DIR}/fun.tbl")
Loading .../fun.tbl
46 objects loaded
>>> table = tables["ANAPRIX"]
>>> table
DIVIS | 1                            |
TITLE |                        "Analyse des prix"
----- | ---------------------------------------------------------------
CELL  |                              |               "#s"
----- | ---------------------------------------------------------------
CELL  | "GAP_"                       |                             GAP_
CELL  | "dln (PC/(1+ITCR))-dln AOUC" | 100*(dln (PC/(1+ITCR))-dln AOUC)

nb lines: 6
nb columns: 2
language: 'ENGLISH'
gridx: 'MAJOR'
gridy: 'MAJOR'
graph_axis: 'VALUES'
graph_alignment: 'LEFT'
>>> table[0]
Analyse des prix
>>> table[0].line_type
'TITLE'
>>> table[0].graph_type
'LINE'
>>> table[0].axis_left
True
__init__()[source]

Methods

__init__()

from_cython_obj(obj)

Attributes

axis_left

Whether or not the values of the present line correspond to the Y axis displayed on the left of the graph.

graph_type

Graph type associated with the table line.

line_type

Type of the table line.