skbio.metadata.MetadataColumn#
- class skbio.metadata.MetadataColumn(series, missing_scheme='blank')[source]#
Abstract base class representing a single metadata column.
Concrete subclasses represent specific metadata column types, e.g.
CategoricalMetadataColumnandNumericMetadataColumn.See the
Metadataclass docstring for details aboutMetadataandMetadataColumnobjects, including a description of column types.The main difference in constructing
MetadataColumnvsMetadataobjects is thatMetadataColumnobjects are constructed from apandas.Seriesobject instead of apandas.DataFrame. Otherwise, the same restrictions, considerations, and data normalization are applied as withMetadataobjects.- Parameters:
- seriespd.Series
The series to construct a column from.
- missing_scheme“blank”, “no-missing”, “INSDC:missing”
How to interpret terms for missing values. These will be converted to NaN. The default treatment is to take no action.
Attributes
id_countNumber of metadata IDs.
id_headerName identifying the IDs associated with the metadata.
idsIDs associated with the metadata.
missing_schemeReturn the vocabulary used to encode missing values.
nameMetadata column name.
typeBuilt-ins
__eq__(other)Determine if this metadata column is equal to another.
__ge__(value, /)Return self>=value.
__getstate__(/)Helper for pickle.
__gt__(value, /)Return self>value.
__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__ne__(other)Determine if this metadata column is not equal to another.
__str__(/)Return str(self).
Methods
Filter out missing values from the metadata column.
filter_ids(ids_to_keep)Filter metadata column by IDs.
get_ids([where_values_missing])Retrieve IDs matching search criteria.
Return a series containing only missing values (with an index).
get_value(id)Retrieve metadata column value associated with an ID.
Determine if the metadata column has one or more missing values.
save(filepath[, ext])Save a TSV metadata file.
to_dataframe([encode_missing])Create a pandas dataframe from the metadata column.
to_series([encode_missing])Create a pandas series from the metadata column.