pmutt.io.excel.read_excel

pmutt.io.excel.read_excel(io, skiprows=[1], header=0, delimiter='.', min_frequency_cutoff=0.0, include_imaginary=False, **kwargs)

Reads an excel file and returns it as a list of dictionaries to initialize objects

Parameters:
  • io (str) – Name of the Excel spreadsheet

  • skiprows (list, optional) – Rows to skip at the beginning (0-indexed). Default is [1] so comments can be put in that row

  • header (int, optional) – Location to find header names (0-index). Default is 0

  • min_frequency_cutoff (float, optional) – Applies for the vib_outcar header. Minimum frequency cutoff (cm-1). Only frequencies greater than min_frequency_cutoff are read from OUTCAR. Default is 0 cm-1

  • include_imaginary (bool, optional) – Applies for the vib_outcar header. Whether or not imaginary frequencies should be included. Default is False

  • delimiter (str, optional) – Delimiter to parse column names. Default is ‘.’

  • **kwargs (keyword arguments) –

    Parameters used by pandas.read_excel. Not required but some potentially useful parameters include:

    • sheet_name (str): Specify the name of the sheet you’re reading

    • converters: Specify how to process certain columns

    • dtype (dict): Expected data type. Will be guessed if not specified

    • na_values (scalar, str, list-like, or dict): What strings to interpret as NaN

    • convert_float (bool): Converts integral floats to int (i.e. 1.0 –> 1)

Returns:

excel_data – Can be used to initialize objects with the **kwargs syntax

Return type:

list of dict

Notes

Special rules exist for the following column headings