mario.Database.to_txt

Database.to_txt(path=None, flows=True, coefficients=False, units=True, scenario='baseline', _format='txt', include_meta=False, sep=',')

Saves the database multiple text file based on given inputs

Note

  • The function will create multiple text files carring on the name of the matrices based on the given inputs.

  • It is suggested to keep the units = True so the output file can be used to parse with MARIO again.

Parameters:
  • path (str) – the path that the Excel file should be saved. If it is None, MARIO will try to use the default path and inform the user with a warning.

  • flows (boolean) – if True, in the Excel file, a sheet will be created named flows containing the data of the flows

  • coefficients (boolean) – if True, in the Excel file, a sheet will be created named coefficients containing the data of the coefficients

  • units (boolean) – if True, in the Excel file, a sheet will be created named units containing the data of the units

  • scenario (str) – defines the scenario to print out the data

  • _format (str) –

    • txt to save as txt files

    • csv to save as csv files

  • include_meta (bool) – saves the metadata as a json file along with the data

  • sep (str) – txt file separator