skbio.table.Table.data#
- Table.data(id, axis='sample', dense=True)[source]#
Returns data associated with an id
- Parameters:
- idstr
ID of the sample or observation whose data will be returned.
- axis{‘sample’, ‘observation’}
Axis to search for id.
- densebool, 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.])