has_data_index
has_data_index checks if a table has a DataIndex for the given key column(s).
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| table | Table | The table to check. |
| key_cols | List[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.