primap2.pm2io.write_interchange_format#
- primap2.pm2io.write_interchange_format(filepath: str | Path, data: DataFrame, attrs: dict | None = None) None [source]#
Write dataset in interchange format to disk.
Writes an interchange format dataset consisting of a pandas Dataframe and an additional meta data dict to disk. The data is stored in a csv file while the additional metadata is written to a yaml file.
- Parameters:
- filepath: str or pathlib.Path
path and filename stem for the dataset. If a file ending is given it will be ignored and replaced by .csv for the data and .yaml for the metadata
- data: pandas.DataFrame
DataFrame in PRIMAP2 interchange format
- attrs: dict, optional
Interchange format meta data dict. Default: use data.attrs .