iode.Variables.i

property Variables.i: VarPositionalIndexer

Allow to select the ith variable in the database.

Examples

>>> from iode import variables, SAMPLE_DATA_DIR
>>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var")
Loading .../fun.var
394 objects loaded
>>> # get the value of the first period of the first variable
>>> variables.i[0, 0]
nan
>>> # get the value of the last period of the last variable
>>> variables.i[-1, -1]
0.68840039
>>> # update the value of the first period of the first variable
>>> variables.i[0, 0] = 3.0
>>> variables.i[0, 0]
3.0
>>> # update the value of the last period of the last variable
>>> variables.i[-1, -1] = 3.0
>>> variables.i[-1, -1]
3.0