- class Pandas¶
Combines all data arrays into a Pandas DataFrame object
The structure of a DataFrame is a very close match to OpenPNMs data storage. Each key becomes a column header in the Dataframe, and each pore or throat entry becomes a row.
Limitations of the DataFrame are the inability to have multidimensional data in a single column. The methods on a DataFrame are also oriented towards time-series data.
Nonetheless, Pandas offers many useful features such as performing statistical analysis on property. DataFrames also offer many options for exporting to other file formats, so if a format is not yet supported by OpenPNM, this could be an solution.
- classmethod export_data(network=None, phases=, join=False, delim=' | ')¶
Convert the Network (and optionally Phase) data to Pandas DataFrames.
network (OpenPNM Network Object) – The network containing the data to be stored
phases (list of OpenPNM Phase Objects) – The data on each supplied phase will be added to DataFrame
join (boolean) – If
False(default), two DataFrames are returned with pore data in one, and throat data in the other. If
Truethe pore and throat data are combined into a single DataFrame. This can be problematic as it will put NaNs into all the pore columns which are shorter than the throat columns.
DataFrameobject containing property and label data in each
joinwas False (default) the two DataFrames are
returned i a named tuple, or else a single DataFrame with pore and
throat data in the same file, despite the column length being