DataType

class audformat.define.DataType[source]

Data types of column content.

Specifies string values representing data types of different columns within a table or misc table. Those string values have to be provided as dtype argument to audformat.Scheme, and are returned by audformat.Scheme.dtype. The exact string values are part of the scheme specifications, and should never be changed by a user.

Use DATE to handle time and date information, e.g. as provided by datetime.datetime. Use TIME to handle duration values.

__eq__()

DataType.__eq__(value, /)

Return self==value.

BOOL

DataType.BOOL = 'bool'

Bool data type.

DATE

DataType.DATE = 'date'

Date data type.

Data type to store date information, e.g. as provided by datetime.datetime.

FLOAT

DataType.FLOAT = 'float'

Float data type.

INTEGER

DataType.INTEGER = 'int'

Integer data type.

OBJECT

DataType.OBJECT = 'object'

Object data type.

This should be used if no other data type fits. Inside pandas it is stored as the object data type, compare pandas.DataFrame.dtypes.

STRING

DataType.STRING = 'str'

String data type.

TIME

DataType.TIME = 'time'

Time data type.

Data type to store durations, e.g. as provided by pandas.Timedelta.