IO¶
FileParser
¶
Parses Excel and CSV files and extracts elemental compositions as pymatgen Composition objects.
Builds the internal list of element symbols for atomic numbers 1 through 102.
parse
¶
Reads an Excel (.xlsx) or CSV (.csv) file and extracts elemental compositions from its columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
The path to the file to parse. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
pandas.DataFrame: A DataFrame containing the extracted elemental compositions. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the file type is not supported. |