DataFile.to_pandas¶
- DataFile.to_pandas()[source]¶
Create a pandas DataFrame from a
Stoner.Data
object.Notes
In addition to transferring the numerical data, the DataFrame’s columns are set to a multi-level index of the
Stoner.Data.column_headers
andStoner.Data.setas
values. A pandas DataFrame extension attribute, metadata is registered and is used to store the metada from the :py:class:1Stoner.Data` object. This pandas extension attribute is in fact a trivial subclass of theStoner.core.typeHintedDict
.The inverse operation can be carried out simply by passing a DataFrame into the copnstructor of the
Stoner.Data
object.- Raises:
**NotImplementedError** if pandas didn't import correctly. –