featuretools.entityset.Entity.convert_variable_type

Entity.convert_variable_type(variable_id, new_type, convert_data=True, **kwargs)

Convert variable in dataframe to different type

Parameters:
  • variable_id (str) – Id of variable to convert.
  • new_type (subclass of Variable) – Type of variable to convert to.
  • entityset (BaseEntitySet) – EntitySet associated with this entity.
  • convert_data (bool) – If True, convert underlying data in the EntitySet.
Raises:

RuntimeError – Raises if it cannot convert the underlying data

Examples

>>> es["customer"].convert_variable_type("education_level", vtypes.Categorical, EntitySet)
    True