skbio.metadata.NumericMetadataColumn.filter_ids#
- NumericMetadataColumn.filter_ids(ids_to_keep)[source]#
Filter metadata column by IDs.
- Parameters:
- ids_to_keepiterable of str
IDs that should be retained in the filtered
MetadataColumn
object. If any IDs in ids_to_keep are not contained in thisMetadataColumn
object, aValueError
will be raised. The filteredMetadataColumn
object will retain the same relative ordering of IDs in thisMetadataColumn
object. Thus, the ordering of IDs in ids_to_keep does not determine the ordering of IDs in the filteredMetadataColumn
object.
- Returns:
- MetadataColumn
The metadata column filtered by IDs.
See also