heartandsole.Activity.has_streams

Activity.has_streams(*field_names)[source]

Return whether all given streams exist in the records DataFrame.

Parameters

*field_names (scalar) – fields to check for in the record DataFrame column index.

Returns

Whether or not all field names are column labels in the record DataFrame.

Return type

bool

Examples

All requested column labels must be present:

>>> act = Activity(pd.DataFrame({'a': [1, 2, 3], 'b': [0, 2, 4]}))
>>> act.has_streams('a', 'b')
True
>>> act.has_streams('a', 'c')
False