James McCool
commited on
Commit
·
f8c497a
1
Parent(s):
7740ecc
Enhance player data processing in load_contest_file.py by removing duplicates
Browse files- Added functionality to drop duplicate entries in the 'Player' column of the DataFrame, ensuring unique player data for improved accuracy.
- Maintained existing mapping and debugging features while refining data integrity during contest file loading.
global_func/load_contest_file.py
CHANGED
@@ -82,6 +82,7 @@ def load_contest_file(upload, helper = None, sport = None):
|
|
82 |
contest_match_dict[key] = value
|
83 |
|
84 |
df_helper['Player'] = df_helper['Player'].map(contest_match_dict)
|
|
|
85 |
|
86 |
print(df_helper[df_helper['Player'] == 'Luis Torrens'])
|
87 |
|
|
|
82 |
contest_match_dict[key] = value
|
83 |
|
84 |
df_helper['Player'] = df_helper['Player'].map(contest_match_dict)
|
85 |
+
df_helper = df_helper.drop_duplicates(subset='Player', keep='first')
|
86 |
|
87 |
print(df_helper[df_helper['Player'] == 'Luis Torrens'])
|
88 |
|