porespy.metrics.props_to_DataFrame#
- porespy.metrics.props_to_DataFrame(regionprops)#
Create a
pandasDataFrame containing all the scalar metrics for each region, such as volume, sphericity, and so on, calculated byregionprops_3D.- Parameters:
regionprops (list) – This is a list of properties for each region that is computed by
regionprops_3D. Becauseregionprops_3Dreturns data in the samelistformat as theregionpropsfunction in Skimage you can pass in either.- Returns:
DataFrame – A Pandas DataFrame with each region corresponding to a row and each column corresponding to a key metric. All the values for a given property (e.g. ‘sphericity’) can be obtained as
val = df['sphericity']. Conversely, all the key metrics for a given region can be found withdf.iloc[1].- Return type:
Pandas DataFrame
See also
prop_to_image,regionprops_3dExamples
Click here to view online example.