mario.Database.add_extensions
- Database.add_extensions(io, matrix, units, backup=True, inplace=True, calc_all=True, notes=None, EY=None)
Adding a new extension [Factor of production or Satellite account] to the database passing the coefficients or the absolute values.
Note
This function will delete all the exisiting scenarios and implement the new sets of the matrices in the baseline.
- Parameters:
io (str, pd.DataFrame) – if the data is given from an excel file, is the path to the file else is a pd.DataFrame
matrix (str) –
defines where the new extension should be added to. The options are :
’v’ value added by coefficient
’V’ value added by absolute value
’e’ satellite account by coefficient
’E’ satellite account by absolute
units (pd.DataFrame) – a dataframe whose rows are the items to be added and single column which contains the units for every row
backup (boolean) – creates a backup of the last database to recover if needed
inplace (boolean) – if True, will change the database inplace otherwise will return a new object
calc_all (boolean) – if True, will calculate the main missing data
notes (list, Optional) – to add notes to the metadata
EY (pd.DataFrame, Optional) – In case that E,e are used as the matrix, EY can be updated too
- Returns:
mario.Database – if inplace= True retunrs a new mario.Databases
None – if inplace= False, changes the database inplace