Skip to content

Commit

Permalink
revert because making things unique broke things
Browse files Browse the repository at this point in the history
  • Loading branch information
CangyuanLi committed Jun 5, 2024
1 parent 8c3eb98 commit 0984803
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/pyethnicity/_ml_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,10 @@ def predict_race_fl(
preds[first_name_col] = first_name
preds[last_name_col] = last_name

df = (
pl.DataFrame(preds)
.select(
first_name_col,
last_name_col,
cs.all().exclude(first_name_col, last_name_col),
)
.unique([first_name_col, last_name_col]) # TODO: Push this unique up
df = pl.DataFrame(preds).select(
first_name_col,
last_name_col,
cs.all().exclude(first_name_col, last_name_col),
)

return df
Expand Down Expand Up @@ -386,7 +382,7 @@ def predict_race(
bifsg_,
on=[name_mapper["first_name"], name_mapper["last_name"], *geo_cols],
how="left",
validate="1:1",
validate="m:1",
suffix="_bifsg",
coalesce=True,
)
Expand Down

0 comments on commit 0984803

Please sign in to comment.