James McCool
commited on
Commit
·
36e7807
1
Parent(s):
02e66e5
Fix ownership and points dictionary updates in find_name_mismatches.py
Browse files- Corrected the logic for updating the ownership and fpts dictionaries to ensure that the correct contest names are mapped to their respective projection names.
- This change improves the accuracy of name mismatches handling in the function, enhancing overall data integrity during processing.
global_func/find_name_mismatches.py
CHANGED
@@ -82,9 +82,9 @@ def find_name_mismatches(contest_df, projections_df, ownership_dict, fpts_dict):
|
|
82 |
contest_df[col] = contest_df[col].replace(contest_name, projection_name)
|
83 |
|
84 |
if contest_name in ownership_dict:
|
85 |
-
ownership_dict[
|
86 |
if contest_name in fpts_dict:
|
87 |
-
fpts_dict[
|
88 |
|
89 |
# Process manual selections
|
90 |
for projection_name, selection in selections.items():
|
|
|
82 |
contest_df[col] = contest_df[col].replace(contest_name, projection_name)
|
83 |
|
84 |
if contest_name in ownership_dict:
|
85 |
+
ownership_dict[contest_name] = ownership_dict.pop(projection_name)
|
86 |
if contest_name in fpts_dict:
|
87 |
+
fpts_dict[contest_name] = fpts_dict.pop(projection_name)
|
88 |
|
89 |
# Process manual selections
|
90 |
for projection_name, selection in selections.items():
|