Skip to content

Commit

Permalink
Trying to capture distance error
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Nov 1, 2024
1 parent 498b693 commit 13b4b27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/votes/populate/policycalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,12 @@ def generate_policy_distributions(
df[col] = df[col].fillna(0)

df["policy_hash"] = df["policy_id"].map(policy_id_lookup)
df["distance_score"] = df.apply(score_from_row, axis=1)
distances = df.apply(score_from_row, axis=1)
try:
df["distance_score"] = distances
except Exception as e:
print(distances)
raise e

df.to_parquet(
policy_dest
Expand Down

0 comments on commit 13b4b27

Please sign in to comment.