James McCool
commited on
Commit
·
ceb4948
1
Parent(s):
f4a3c34
Reorder player information sorting in app.py to enhance data accuracy by ensuring duplicates are removed after sorting by salary
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def grab_contest_player_info(db, sport, type, contest_date):
|
|
42 |
|
43 |
player_info = pd.DataFrame(list(cursor)).drop('_id', axis=1)
|
44 |
player_info = player_info[player_info['Contest Date'] == contest_date]
|
45 |
-
player_info = player_info.sort_values(by='Salary', ascending=True).drop_duplicates(subset='Player', keep='first')
|
46 |
player_info = player_info.rename(columns={'Display Name': 'Player'})
|
|
|
47 |
|
48 |
info_maps = {
|
49 |
'position_dict': dict(zip(player_info['Player'], player_info['Position'])),
|
|
|
42 |
|
43 |
player_info = pd.DataFrame(list(cursor)).drop('_id', axis=1)
|
44 |
player_info = player_info[player_info['Contest Date'] == contest_date]
|
|
|
45 |
player_info = player_info.rename(columns={'Display Name': 'Player'})
|
46 |
+
player_info = player_info.sort_values(by='Salary', ascending=True).drop_duplicates(subset='Player', keep='first')
|
47 |
|
48 |
info_maps = {
|
49 |
'position_dict': dict(zip(player_info['Player'], player_info['Position'])),
|