pyiron_base.storage.filedata.load_file

Contents

pyiron_base.storage.filedata.load_file#

pyiron_base.storage.filedata.load_file(fp, filetype=None, project=None)[source]#

Load the file and return an appropriate object containing the data.

Parameters:
  • fp (str / file) – path to the file or file object to be displayed.

  • filetype (str/None) – File extension, if given this overwrites the assumption based on the filename.

  • project (pyiron-Project/None) – Project calling this function, provided to all objects referring to such.

  • are (Supported file types)

  • '.h5'

  • '.hdf'

  • '.json'

  • '.txt'

  • '.csv'

  • '.ipynb'

  • PIL (Image extensions supported by)

Returns:

pointing to the file of filetype = ‘.h5’ dict/list: containing data from file of filetype = ‘.json’ list: of all lines from file for filetype = ‘.txt’ pandas.DataFrame: containing data from file of filetype = ‘.csv’

Return type:

FileHDFio/ProjectHDFio