alteryx / alteryx/featuretools

Allow relationships to be given custom names

Aperta
#633 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
API needs design new feature
Lingua principale
Python
Stelle
7.7k
Fork
915
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.