Define labels → Generate template → Fill values → Parse

Create an IOT template#

import mario

mario.write_parse_template(
    "custom_iot.xlsx", table="IOT",
    sets={
        "regions": ["Reg1", "Reg2"],
        "sectors": ["Agriculture", "Services"],
        "final demand": ["Final demand"],
        "factors": ["Taxes", "Wages"], "satellites": ["CO2"],
    },
    units={"sectors": "M EUR", "factors": "M EUR", "satellites": "kg"},
)

Fill the generated blocks and units before parsing. The template defines the layout; it does not provide economic data.

Read the completed file#

db = mario.parse_from_excel(path="custom_iot.xlsx", table="IOT", mode="flows")
db.get_index("all")
db.Z
SUT templates

Use table="SUT" and provide activities and commodities instead of sectors, with units for both. The companion notebook includes a complete SUT template example.