skbio.metadata.CategoricalMetadataColumn.save#

CategoricalMetadataColumn.save(filepath, ext=None)[source]#

Save a TSV metadata file.

The TSV metadata file format is described at https://docs.qiime2.org in the Metadata Tutorial.

The file will always include the #sk:types directive in order to make the file roundtrippable without relying on column type inference.

Parameters:
filepathstr

Path to save TSV metadata file at.

extstr

Preferred file extension (.tsv, .txt, etc). Will be left blank if no extension is included. Including a period in the extension is optional, and any additional periods delimiting the filepath and the extension will be reduced to a single period.

Returns:
str

Filepath and extension (if provided) that the file was saved to.

See also

Metadata.load