Created
August 15, 2018 14:50
-
-
Save WillKoehrsen/a86e3e7e367506114a503b7db4dd0639 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import featuretools as ft | |
def entityset_from_partition(path): | |
"""Create an EntitySet from a partition of data""" | |
# Read in data from path | |
app = pd.read_csv('%s/app.csv' % path) | |
... # Read in 6 other files | |
# Create the entityset and add tables and relationships | |
es = ft.EntitySet(id = 'clients') | |
es = es.entity_from_dataframe('app', dataframe = app, ...) | |
... # Add the other 6 tables | |
relationship_one = ft.Relationship(...) | |
... # Add in 5 other relationships | |
es = es.add_relationships([relationship_one, ...]) | |
...# Add in interesting values if necessary | |
return es |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment