Skip to content

Commit

Permalink
Update ancestry.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mvansegbroeck authored and mckornfield committed Mar 6, 2024
1 parent 910d175 commit 287daec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gretel_trainer/relational/ancestry.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _join_parents(
left_on_cols = [f"{lineage}{_END_LINEAGE}{col}" for col in foreign_key.columns]
right_on_cols = [f"{next_lineage}{_END_LINEAGE}{parent_col}" for parent_col in foreign_key.parent_columns]
for left_col, right_col in zip(left_on_cols, right_on_cols):
if parent_data[right_col].dtype == "object"
if parent_data[right_col].dtype == "object":
df[left_col] = df[left_col].astype(parent_data[right_col].dtype)

df = df.merge(parent_data, how="left", left_on=left_on_cols, right_on=right_on_cols)
Expand Down

0 comments on commit 287daec

Please sign in to comment.