James McCool
commited on
Commit
·
f4a3c34
1
Parent(s):
f56fa41
Sort player information by salary and remove duplicates in app.py for improved data accuracy
Browse files
app.py
CHANGED
|
@@ -42,6 +42,7 @@ 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.rename(columns={'Display Name': 'Player'})
|
| 46 |
|
| 47 |
info_maps = {
|
|
|
|
| 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 = {
|