mario.parse_from_txt

mario.parse_from_txt(path, table, mode, calc_all=False, year=None, name=None, source=None, model='Database', sep=',', **kwargs)

Parsing database from text files

Note

This function works with different files to parse the io data. So every matrix & units should be placed in different txt files.

Parameters:
  • path (str) – defined the folder that contains data files.

  • table (str) – acceptable options are ‘IOT’ & ‘SUT’

  • mode (str) –

    defined the base matrices to parse. The options are:

    • flows: needs [Z.txt, Y.txt, EY.txt, V.txt, E.txt, units.txt] in the path

    • coefficients: needs [z.txt, Y.txt, EY.txt, v.txt, e.txt, units.txt] in the path

  • calc_all (boolean) – if True, by default will calculate z,v,e,V,E,Z after parsing

  • year (int, Optional) – optional to the Database (just for recoding the metadata)

  • source (str, Optional) – optional to the Database (just for recoding the metadata)

  • name (str, Optional) – optional but suggested. is useful for visualization and metadata.

  • sep (str, Optional) – txt file separator

Return type:

mario.Database