woodwork.datatable.DataTable.set_index

DataTable.set_index(index)[source]

Set the index column and return a new DataTable. Adds the ‘index’ semantic tag to the column and clears the tag from any previously set index column. Setting a column as the index column will also cause any previously set standard tags for the column to be removed.

Parameters

index (str) – The name of the column to set as the index

Returns

DataTable with the specified index column set.

Return type

woodwork.DataTable