woodwork.data_column.DataColumn.set_logical_type

DataColumn.set_logical_type(logical_type, retain_index_tags=True)[source]

Update the logical type for the column and return a new DataColumn object.

Parameters
  • logical_type (LogicalType, str) – The new logical type to set for the column.

  • retain_index_tags (bool, optional) – If True, any ‘index’ or ‘time_index’ tags on the column will be retained. If False, all tags will be cleared. Defaults to True.

Returns

DataColumn with updated logical type.

Return type

woodwork.DataColumn