mario.Database.get_aggregation_excel#

Create an aggregation workbook for one or more sets.

Use region_aggregation when you want MARIO to prefill the Region sheet for you. This is useful both for region-only aggregation and for mixed workflows where you want to aggregate Region together with other sets such as Sector.

db.get_aggregation_excel(
        path="/path/to/exiobase_region_template.xlsx",
        levels=["Sector"],
        region_aggregation="continent",
        overwrite=True,
)

The resulting workbook contains a prefilled Region sheet and leaves the other requested sheets empty for manual editing.

Database.get_aggregation_excel(path=None, levels='all', overwrite=False, region_aggregation=None)#

Write an aggregation template workbook for the selected levels.

Parameters:
  • path – Output path for the workbook. When omitted, MARIO writes to the default Excel output directory.

  • levels – One classification level, an iterable of levels, or "all" to include every aggregable level for the current table type.

  • overwrite – When True, replace an existing workbook at path.

  • region_aggregation – Optional Region prefill used to aggregate regions without manually editing the Region sheet. Accepted values are preset strings such as "continent", "UNregion", "EU", "OECD", "G7" and "G20", or an explicit mapping/Series/DataFrame.

Returns:

The workbook is written to disk.

Return type:

None