Skip to main content
`Ctrl`+`K`

# skbio.metadata.SampleMetadata.filter_columns

SampleMetadata.filter_columns(*, column_type=None, drop_all_unique=False, drop_zero_variance=False, drop_all_missing=False)

  Filter metadata by columns.

  Parameters:
    column_type str, optional

      If supplied, will retain only columns of this type. The currently supported column types are ‘numeric’ and ‘categorical’.

    drop_all_unique bool, 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_variance bool, 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_missing bool, 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

  `filter_ids`