woodwork.datatable.DataTable.set_types

DataTable.set_types(logical_types=None, semantic_tags=None, retain_index_tags=True)[source]

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

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

  • semantic_tags (dict[str -> str/list/set], optional) – A dictionary defining the new semantic_tags 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 replace all semantic tags. Defaults to True.

Returns

DataTable with updated logical types and specified semantic tags set.

Return type

woodwork.DataTable