biom.table.Table.data¶
- Table.data(id, axis='sample', dense=True)¶
Returns data associated with an id
Parameters: id : str
ID of the sample or observation 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
Examples
>>> from biom import example_table >>> example_table.data('S1', axis='sample') array([ 0., 3.])