# biom-format.org

## biom.table.Table.group_metadata

Table.group_metadata(axis='sample')

  Return the group metadata of the given axis

  Parameters:
    axis{‘sample’, ‘observation’}, optional

      Axis to search for the group metadata. Defaults to ‘sample’

  Returns:
    dict

      The corresponding group metadata for the given axis

  Raises:
    UnknownAxisError

      If provided an unrecognized axis.

  Examples

      >>> import numpy as np
      >>> from biom.table import Table

  Create a 2x3 BIOM table, with group observation metadata and no group sample metadata:

      >>> data = np.asarray([[0, 0, 1], [1, 3, 42]])
      >>> group_observation_md = {'tree': ('newick', '(O1:0.3,O2:0.4);')}
      >>> table = Table(data, ['O1', 'O2'], ['S1', 'S2', 'S3'],
      ...               observation_group_metadata=group_observation_md)

  Get the observation group metadata:

      >>> table.group_metadata(axis='observation')
      {'tree': ('newick', '(O1:0.3,O2:0.4);')}

  Get the sample group metadata:

  >> table.group_metadata() None