is_segmented_index()

audformat.is_segmented_index(obj)[source]

Check if object has a segmented index.

Returns True if index is a segmented index conform to table specifications.

Parameters

obj (Union[Index, Series, DataFrame]) – object

Return type

bool

Returns

True if index is segmented, otherwise False

Examples

>>> is_segmented_index(segmented_index())
True
>>> is_segmented_index(pd.Index([]))
False