Database.export_sets(path=None, *, include_scenarios=True)#

Export the current sets to an Excel workbook using MARIO names.

Parameters:
  • path – Workbook path or output directory. Directories receive a sets.xlsx file. Defaults to Database/sets.xlsx under directory. Missing parent directories are created.

  • include_scenarios – When True, also write a Scenario sheet containing the current scenario names.

Returns:

Path of the written workbook.

Return type:

pathlib.Path

Notes

Each set has its own sheet and a column named after the set, with members in their current order. Nonuniform regional sets retain one row per observed region/member pair in Region and set columns. Common sets remain single-column lists. No matrices are calculated. Sheet and column names use canonical MARIO set names; input aliases do not rename them. Names are not mapped to another application.

Examples

>>> db = mario.load_test("SUT")
>>> path = db.export_sets(path="exports/sets.xlsx")

See Export the current sets for a worked call and the workbook layout.