gEconpy.model.statistics.matrix_to_dataframe#
- gEconpy.model.statistics.matrix_to_dataframe(matrix, model, dim1=None, dim2=None, round=None)#
Convert a matrix to a DataFrame with variable names as columns and rows.
- Parameters:
- matrix: np.ndarray
DSGE matrix to convert to a DataFrame. Each dimension should have shape n_variables or n_shocks.
- model: Model
DSGE model object.
- dim1: str, optional
Name of the first dimension. One of
'variable','equation', or'shock'.- dim2: str, optional
Name of the second dimension.
- round: int, optional
Decimal places.
- Returns:
pd.DataFrame