biom.table.Table.data — biom-format.org

# biom-format.org

## biom.table.Table.data

`Table.` `data`(id, axis='sample', dense=True)

  Returns data associated with an id

  Parameters: | id : str ID of the samples or observations whose data will be returned. axis : {‘sample’, ‘observation’} Axis to search for id. dense : bool, optional If `True`, return data as dense
  Returns: | np.ndarray or scipy.sparse.spmatrix np.ndarray if `dense`, otherwise scipy.sparse.spmatrix
  Raises: | UnknownAxisError If provided an unrecognized axis.

  See also

  `Table.get_value_by_ids`

  Examples

      >>> from biom import example_table
      >>> example_table.data('S1', axis='sample')
      array([ 0.,  3.])