mario.calc_y
- mario.calc_y(Y)#
Normalize the
Yfinal demand matrix by its grand total.\[y = \frac{Y}{\sum_{i,j}Y_{ij}}\]- Parameters:
Y (pandas.DataFrame) –
Yfinal demand matrix.- Returns:
Shares of the
Yfinal demand matrix, computed asY / 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.