has_data_index

has_data_index checks if a table has a DataIndex for the given key column(s).

Syntax

Parameters

ParameterTypeDescription
tableTable

The table to check.

key_colsList[str]

The names of the key column(s) indexed.

Returns

A bool indicating whether or not the table has a DataIndex for the given key column(s).

Examples

The following example checks if a table has an index for one or two key columns.