mario.calc_y(Y)#

Normalize the Y final demand matrix by its grand total.

\[y = \frac{Y}{\sum_{i,j}Y_{ij}}\]
Parameters:

Y (pandas.DataFrame) – Y final demand matrix.

Returns:

Shares of the Y final demand matrix, computed as Y / Y.sum().sum().

Return type:

pandas.DataFrame

Notes

Normalization uses one grand total for the whole matrix, rather than normalizing each row or column separately. A zero grand total is not replaced: pandas division can produce NaN or infinite values.