alteryx / alteryx/featuretools

Allow relationships to be given custom names

Offen
#633 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
API needs design new feature
Vorherrschende Sprache
Python
Sterne
7.7k
Forks
915
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.