iode.ComputedTable
- class iode.ComputedTable
Object returned by the method
compute(). It represents the computation of an IODE table given a generalized sample.Examples
>>> from iode import SAMPLE_DATA_DIR >>> from iode import Table, tables, variables >>> tables.load(f"{SAMPLE_DATA_DIR}/fun.tbl") >>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var") >>> tables["C8_1"] DIVIS | 1 | TITLE | "Déterminants de l'output potentiel" ----- | --------------------------------------------- CELL | | "#s" ----- | --------------------------------------------- CELL | "Output potentiel" | Q_F+Q_I CELL | "Stock de capital" | KNFF[-1] CELL | "Intensité de capital" | KLFHP CELL | "Productivité totale des facteurs" | TFPFHP_ nb lines: 8 nb columns: 2 language: 'ENGLISH' gridx: 'MAJOR' gridy: 'MAJOR' graph_axis: 'VALUES' graph_alignment: 'LEFT' >>> # simple time series (current workspace) - 6 observations - 4 decimals >>> computed_table = tables["C8_1"].compute("2000:6", nb_decimals=4) >>> computed_table line title \ period[file] | 00 | 01 | 02 | 03 | 04 | 05 --------------------------------------------------------------------------------------------------------- Output potentiel | 5495.2128 | 5627.8589 | 5748.7804 | 5857.9529 | 5966.1999 | 6103.6318 Stock de capital | 8083.5517 | 8359.8908 | 8647.9354 | 8910.3393 | 9175.8106 | 9468.8865 Intensité de capital | 0.5032 | 0.4896 | 0.4758 | 0.4623 | 0.4481 | 0.4349 Productivité totale des facteurs | 0.9938 | 1.0037 | 1.0137 | 1.0239 | 1.0341 | 1.0445 >>> # two time series (current workspace) - 5 observations - 2 decimals >>> computed_table = tables["C8_1"].compute("(2010;2010/2009):5") >>> computed_table line title \ period[file] | 10 | 10/09 | 11 | 11/10 | 12 | 12/11 | 13 | 13/12 | 14 | 14/13 -------------------------------------------------------------------------------------------------------------------------------- Output potentiel | 6936.11 | 1.74 | 7045.34 | 1.57 | 7161.54 | 1.65 | 7302.29 | 1.97 | 7460.12 | 2.16 Stock de capital | 11293.85 | 2.82 | 11525.01 | 2.05 | 11736.78 | 1.84 | 11975.49 | 2.03 | 12263.95 | 2.41 Intensité de capital | 0.39 | -2.17 | 0.38 | -2.05 | 0.37 | -1.91 | 0.36 | -1.86 | 0.36 | -1.9 Productivité totale des facteurs | 1.1 | 1.0 | 1.11 | 1.0 | 1.12 | 1.0 | 1.13 | 1.0 | 1.14 | 1.0 >>> # simple time series (current workspace + one extra file) - 5 observations - 2 decimals >>> computed_table = tables["C8_1"].compute("2010[1;2]:5", extra_files=f"{SAMPLE_DATA_DIR}/ref.av") >>> computed_table line title \ period[file] | 10[1] | 10[2] | 11[1] | 11[2] | 12[1] | 12[2] | 13[1] | 13[2] | 14[1] | 14[2] ----------------------------------------------------------------------------------------------------------------------------------------------- Output potentiel | 6936.11 | 6797.39 | 7045.34 | 6904.44 | 7161.54 | 7018.31 | 7302.29 | 7156.24 | 7460.12 | 7310.91 Stock de capital | 11293.85 | 11067.97 | 11525.01 | 11294.51 | 11736.78 | 11502.05 | 11975.49 | 11735.98 | 12263.95 | 12018.67 Intensité de capital | 0.39 | 0.38 | 0.38 | 0.37 | 0.37 | 0.36 | 0.36 | 0.36 | 0.36 | 0.35 Productivité totale des facteurs | 1.1 | 1.08 | 1.11 | 1.09 | 1.12 | 1.1 | 1.13 | 1.11 | 1.14 | 1.12
- Attributes:
columnscolumns: List[str]
filesfiles: List[str]
lineslines: List[str]
nb_columnsnb_columns: int
nb_decimalsnb_decimals: int
nb_filesnb_files: int
nb_linesnb_lines: int
nb_operations_between_filesnb_operations_between_files: int
nb_periodsnb_periods: int
samplesample: Sample
titletitle: str
Methods
is_editable(self, row, column)Check if a cell in the computed table is editable.
to_array(self)Convert the computed table to a larray Array.
to_frame(self)Convert the computed table to a pandas DataFrame.
- __init__(*args, **kwargs)
Methods
__init__(*args, **kwargs)is_editable(self, row, column)Check if a cell in the computed table is editable.
to_array(self)Convert the computed table to a larray Array.
to_frame(self)Convert the computed table to a pandas DataFrame.
Attributes
columns: List[str]
files: List[str]
lines: List[str]
nb_columns: int
nb_decimals: int
nb_files: int
nb_lines: int
nb_operations_between_files: int
nb_periods: int
sample: Sample
title: str