Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def entity_from_dataframe(entityset, entityset_id, entity_id, dataframe, index=None,
variable_types=None, make_index=False, time_index=None,
secondary_time_index=None, already_sorted=False):
if entityset is None:
entityset = ft.EntitySet(entityset_id)
entityset.entity_from_dataframe(entity_id, dataframe.copy(), index, variable_types,
make_index, time_index, secondary_time_index,
already_sorted)
return entityset
def _get_entityset(self, X, target_entity, entities, relationships):
if entities is None:
X, index = self._get_index(X)
entities = {
'X': (X, index)
}
if relationships is None:
relationships = []
return ft.EntitySet('entityset', entities, relationships)