skbio.metadata.SampleMetadata.filter_columns#
- SampleMetadata.filter_columns(*, column_type=None, drop_all_unique=False, drop_zero_variance=False, drop_all_missing=False)[source]#
Filter metadata by columns.
- Parameters:
- column_typestr, optional
If supplied, will retain only columns of this type. The currently supported column types are ‘numeric’ and ‘categorical’.
- drop_all_uniquebool, optional
If
True
, columns that contain a unique value for every ID will be dropped. Missing data (np.nan
) are ignored when determining unique values. If a column consists solely of missing data, it will be dropped.- drop_zero_variancebool, optional
If
True
, columns that contain the same value for every ID will be dropped. Missing data (np.nan
) are ignored when determining variance. If a column consists solely of missing data, it will be dropped.- drop_all_missingbool, optional
If
True
, columns that have a missing value (np.nan
) for every ID will be dropped.
- Returns:
- Metadata
The metadata filtered by columns.
See also