James McCool
commited on
Commit
·
c916e66
1
Parent(s):
4ad4038
Enhance name matching feedback in find_name_mismatches function
Browse files- Added a warning message for players with no match found, improving user awareness during the matching process.
- Updated conditions to ensure players with a match percentage below 75% are flagged for manual review, enhancing data handling and user experience.
global_func/find_name_mismatches.py
CHANGED
@@ -32,8 +32,10 @@ def find_name_mismatches(contest_df, projections_df, ownership_df, fpts_df):
|
|
32 |
match_name = closest_matches[0][0]
|
33 |
auto_matches[player] = match_name
|
34 |
st.success(f"Automatically matched '{player}' with '{match_name}' ({closest_matches[0][1]}% match)")
|
35 |
-
|
36 |
players_to_process.append(player)
|
|
|
|
|
37 |
|
38 |
if players_to_process:
|
39 |
st.warning(f"Found {len(players_to_process)} players that need manual matching")
|
|
|
32 |
match_name = closest_matches[0][0]
|
33 |
auto_matches[player] = match_name
|
34 |
st.success(f"Automatically matched '{player}' with '{match_name}' ({closest_matches[0][1]}% match)")
|
35 |
+
elif closest_matches[0][1] >= 75:
|
36 |
players_to_process.append(player)
|
37 |
+
else:
|
38 |
+
st.warning(f"No match found for '{player}'")
|
39 |
|
40 |
if players_to_process:
|
41 |
st.warning(f"Found {len(players_to_process)} players that need manual matching")
|