file_parser¶
The VASP_PARSER
class¶
-
class
VASP_PARSER
(directory, create_files=False)[source]¶ Class for parsing vasp and chargemol files
Summary goes on one line here
- Parameters
- Variables
freq_dirs (list of str) – List of directories where concatenated vasprun.xml and chargemol files are located.
create_files (list of str) – list of preprocessed concatenated DECC6 charge files
The explode
function¶
-
explode
(df, lst_cols, fill_value='', preserve_index=True)[source]¶ Take a pandas data frame with list components and explode so there is a separate line for each value in the list
- Parameters
df (pandas.dataframe) – Dataframe to expand
lst_cols (list) – list of columns names whose cells are lists that are to be expanded into their own rows
fill_value (str) – If a column does not does not have the same number of indices as in a specific row as the other cells with lists replace NA with fill_value
preserve_index (bool) – Indicates whether the indices of the dataframe should be preserved after expanding
- Returns
res – Expanded dataframe
- Return type
pandas.dataframe