craftutils.wrap.dragons.Table.add_index(colnames, engine=None, unique=False)

Insert a new index among one or more columns. If there are no indices, make this index the primary table index.

Parameters

colnamesstr or list

List of column names (or a single column name) to index

enginetype or None

Indexing engine class to use, either ~astropy.table.SortedArray, ~astropy.table.BST, or ~astropy.table.SCEngine. If the supplied argument is None (by default), use ~astropy.table.SortedArray.

uniquebool

Whether the values of the index must be unique. Default is False.