iode.ComputedTable.nb_decimals
- property ComputedTable.nb_decimals: int
The number of decimals used for rounding the values when displayed.
- Parameters:
- value: int
Examples
>>> from iode import SAMPLE_DATA_DIR >>> from iode import Table, tables, variables >>> tables.load(f"{SAMPLE_DATA_DIR}/fun.tbl") Loading .../fun.tbl 46 objects loaded >>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var") Loading .../fun.var 394 objects loaded
>>> # simple time series (current workspace) - 6 observations - 2 decimals (default) >>> computed_table = tables["C8_1"].compute("2000:6") >>> computed_table line title \ period[file] | 00 | 01 | 02 | 03 | 04 | 05 --------------------------------------------------------------------------------------------- Output potentiel | 5495.21 | 5627.86 | 5748.78 | 5857.95 | 5966.20 | 6103.63 Stock de capital | 8083.55 | 8359.89 | 8647.94 | 8910.34 | 9175.81 | 9468.89 Intensité de capital | 0.50 | 0.49 | 0.48 | 0.46 | 0.45 | 0.43 Productivité totale des facteurs | 0.99 | 1.00 | 1.01 | 1.02 | 1.03 | 1.04
>>> # specify to print 4 decimals >>> computed_table.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