woodwork.data_table.DataTable.set_logical_types

DataTable.set_logical_types(logical_types, retain_index_tags=True)[source]

Update the logical type for any columns names in the provided logical_types dictionary. Replaces existing columns with new DataColumn objects and returns a new DataTable object.

Parameters
  • logical_types (dict[str -> str/list/set]) – A dictionary defining the new logical types for the specified columns.

  • retain_index_tags (bool, optional) – If True, will retain any index or time_index semantic tags set on the column. If false, will clear all semantic tags. Defaults to True.

Returns

DataTable with updated logical types

Return type

woodwork.DataTable