malariagen_data.af1.Af1.count_samples#

Af1.count_samples(sample_sets: Sequence[str] | str | None = None, sample_query: str | None = None, index: str | Sequence[str] = ('country', 'admin1_iso', 'admin1_name', 'admin2_name', 'year'), columns: str | Sequence[str] = 'taxon') DataFrame#

Create a pivot table showing numbers of samples available by space, time and taxon.

Parameters#

sample_setssequence of str or str or None, optional

List of sample sets and/or releases. Can also be a single sample set or release.

sample_querystr or None, optional

A pandas query string to be evaluated against the sample metadata, to select samples to be included in the returned data.

indexstr or sequence of str, optional, default: (‘country’, ‘admin1_iso’, ‘admin1_name’, ‘admin2_name’, ‘year’)

Sample metadata columns to use for the pivot table index.

columnsstr or sequence of str, optional, default: ‘taxon’

Sample metadata columns to use for the pivot table columns.

Returns#

DataFrame

Pivot table of sample counts.