upxo.pxtal.fm_steel_3d.distribution_export module

Writing property distributions to files.

upxo.pxtal.fm_steel_3d.distribution_export.export_distributions(distributions: Dict[str, Dict[str, list]], folder, formats: Iterable[str]) → List[Path][source]

Write {group: {property: [values]}} to folder and return the files.

Properties without values are left out and a group with none is skipped. Per group:

csv <group>_distributions.csv, one column per property, shorter

columns padded with empty cells;

xlsx <group>_distributions.xlsx (pandas), or, without pandas,

<group>_distributions_nopandas.csv as for csv;

txt <group>_<property>.txt, one value per line; pickle <group>_distributions.pkl, the dict of the group.

folder is created if needed.