NOTICE
The upcoming release of Featuretools 1.0.0 contains several breaking changes. Users are encouraged to test this version prior to release by installing from GitHub:
pip install https://github.com/alteryx/featuretools/archive/woodwork-integration.zip
For details on migrating to the new version, refer to Transitioning to Featuretools Version 1.0. Please report any issues in the Featuretools GitHub repo or by messaging in Alteryx Open Source Slack.
Entity.
convert_variable_type
Convert variable in dataframe to different type
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.
BaseEntitySet
convert_data (bool) – If True, convert underlying data in the EntitySet.
RuntimeError – Raises if it cannot convert the underlying data
Examples
>>> from featuretools.tests.testing_utils import make_ecommerce_entityset >>> es = make_ecommerce_entityset() >>> es["customers"].convert_variable_type("engagement_level", vtypes.Categorical)