skbio.metadata.SampleMetadata.to_dataframe#
- SampleMetadata.to_dataframe(encode_missing=False)[source]#
Create a pandas dataframe from the metadata.
The dataframe’s index name (
Index.name
) will match this metadata object’sid_header
, and the index will contain this metadata object’s IDs. The dataframe’s column names will match the column names in this metadata. Categorical columns will be stored asdtype=object
(containing strings), and numeric columns will be stored asdtype=float
.- Parameters:
- encode_missingbool, optional
Whether to convert missing values (NaNs) back into their original vocabulary (strings) if a missing scheme was used.
- Returns:
- pandas.DataFrame
Dataframe constructed from the metadata.