index_type()

audformat.index_type(obj)[source]

Derive index type.

Possible return values are given by audformat.define.IndexType.

Parameters:

obj (Index | Series | DataFrame) – object conform to table specifications

Return type:

IndexType

Returns:

table type

Raises:

ValueError – if not conform to table specifications

Examples

>>> index_type(filewise_index())
'filewise'
>>> index_type(segmented_index())
'segmented'