James McCool
commited on
Commit
·
0fb666c
1
Parent(s):
e04a121
Enhance player data processing in load_contest_file.py by applying mapping and deduplication to both df_helper and df dataframes. This change ensures consistent player information handling across different dataframes, improving data integrity.
Browse files
global_func/load_contest_file.py
CHANGED
@@ -84,7 +84,9 @@ def load_contest_file(upload, type, helper = None, sport = None):
|
|
84 |
contest_match_dict[key] = value
|
85 |
|
86 |
df_helper['Player'] = df_helper['Player'].map(contest_match_dict)
|
|
|
87 |
df_helper = df_helper.drop_duplicates(subset='Player', keep='first')
|
|
|
88 |
|
89 |
# Create separate dataframes for different player attributes
|
90 |
if helper is not None:
|
|
|
84 |
contest_match_dict[key] = value
|
85 |
|
86 |
df_helper['Player'] = df_helper['Player'].map(contest_match_dict)
|
87 |
+
df['Player'] = df['Player'].map(contest_match_dict)
|
88 |
df_helper = df_helper.drop_duplicates(subset='Player', keep='first')
|
89 |
+
df = df.drop_duplicates(subset='Player', keep='first')
|
90 |
|
91 |
# Create separate dataframes for different player attributes
|
92 |
if helper is not None:
|