featuretools.load_features#

featuretools.load_features(features, profile_name=None)[source]#

Loads the features from a filepath, S3 path, URL, an open file, or a JSON formatted string.

Parameters:
  • features (str or FileObject) – The file location of saved features.

  • file (This must either be the name of the) –

  • string (a JSON formatted) –

  • handle. (or a readable file) –

  • profile_name (str, bool) – The AWS profile specified to write to S3. Will default to None and search for AWS credentials. Set to False to use an anonymous profile.

Returns:

Feature definitions list.

Return type:

features (list[FeatureBase])

Note

Features saved in one version of Featuretools or Python are not guaranteed to work in another. After upgrading Featuretools or Python, features may need to be generated again.

Example

# Option 1
filepath = os.path.join('/Home/features/', 'list.json')
features = ft.load_features(filepath)

# Option 2
filepath = os.path.join('/Home/features/', 'list.json')
with open(filepath, 'r') as f:
    features = ft.load_features(f)

# Option 3
filepath = os.path.join('/Home/features/', 'list.json')
with open(filepath, 'r') as :
    feature_str = f.read()
features = ft.load_features(feature_str)

See also

save_features()