alteryx / alteryx/featuretools

Allow relationships to be given custom names

Open
#633 0 comments 0 reactions 0 assignees View on GitHub
API needs design new feature
Dominant language
Python
Stars
7.7k
Forks
915
PR merge metrics
No merged PRs in 30d

Description

This could be useful when there are multiple relationships between two entities. For example:
```
games.home_team_id -> teams.id
games.away_team_id -> teams.id
```
Currently we disambiguate by using the `child_variable_id`, generating features with names like the following
```
Forward:
teams[home_team_id].MEAN(...)
teams[away_team_id].MEAN(...)

Backward:
MEAN(games[home_team_id].home_score)
MEAN(games[away_team_id].away_score)
```
It would be clearer if each direction of each relationship had its own name, allowing the above to be rendered as
```
Forward:
home_team.MEAN(...)
away_team.MEAN(...)

Backward:
MEAN(home_games.home_score)
MEAN(away_games.away_score)
````
We could allow names like this to be specified through an API like the following:
```py
relationship.rename(parent_name='home_team', child_name='home_games')
```
The above situation may not be common enough to make this enhancement worthwhile – further discussion is needed.

See #543

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.