skbio.table.Table.nonzero_counts#

Table.nonzero_counts(axis, binary=True)[source]#

Get nonzero summaries about an axis

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

The axis on which to count nonzero entries

binarybool, optional

Defaults to True. If True, return number of nonzero entries. If False, sum the values of the entries.

Returns:
numpy.array

Counts in index order to the axis