iode.Variables.__rtruediv__

Variables.__rtruediv__(other)[source]

divide other by the current (subset of) Variables object.

Parameters:
other: iode Variables

self and other must share the same sample and represent the same set of variables names.

Returns:
Variables

Examples

>>> import numpy as np
>>> import pandas as pd
>>> import larray as la
>>> from iode import SAMPLE_DATA_DIR
>>> from iode import variables, NA, Sample
>>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var")
Loading .../fun.var
394 objects loaded
>>> vars_subset = variables["A*", "1991Y1:1995Y1"]
>>> vars_subset.names
['ACAF', 'ACAG', 'AOUC', 'AOUC_', 'AQC']
>>> vars_subset
Workspace: Variables
nb variables: 5
filename: ...fun.var
description: Modèle fun - Simulation 1
sample: 1991Y1:1995Y1
mode: LEVEL

 name       1991Y1  1992Y1  1993Y1  1994Y1  1995Y1
ACAF         26.24   30.16   34.66    8.16  -13.13
ACAG        -30.93  -40.29  -43.16  -16.03  -41.85
AOUC          1.02    1.03    1.03    1.05    1.05
AOUC_         0.96    0.97    0.98    0.99    1.00
AQC           1.06    1.11    1.15    1.16    1.16
>>> # divide (a subset of) a Variables object by another
>>> new_vars_subset = vars_subset / vars_subset
>>> new_vars_subset
Workspace: Variables
nb variables: 5
filename: ...fun.var
description: Modèle fun - Simulation 1
sample: 1991Y1:1995Y1
mode: LEVEL

 name   1991Y1  1992Y1  1993Y1  1994Y1  1995Y1
ACAF      1.00    1.00    1.00    1.00    1.00
ACAG      1.00    1.00    1.00    1.00    1.00
AOUC      1.00    1.00    1.00    1.00    1.00
AOUC_     1.00    1.00    1.00    1.00    1.00
AQC       1.00    1.00    1.00    1.00    1.00