Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
3d72ea9
1
Parent(s):
f646011
Add player salary to simple view summary DataFrame
Browse files
app.py
CHANGED
|
@@ -171,6 +171,7 @@ def convert_df(array):
|
|
| 171 |
return array.to_csv().encode('utf-8')
|
| 172 |
|
| 173 |
dk_raw, fd_raw, dk_raw_sec, fd_raw_sec, roo_raw, timestamp, roo_backlog = load_overall_stats()
|
|
|
|
| 174 |
|
| 175 |
try:
|
| 176 |
dk_lineups = init_DK_lineups()
|
|
@@ -587,7 +588,8 @@ with tab2:
|
|
| 587 |
summary_df = pd.DataFrame({
|
| 588 |
'Player': value_counts.index,
|
| 589 |
'Frequency': value_counts.values,
|
| 590 |
-
'Percentage': percentages.values
|
|
|
|
| 591 |
})
|
| 592 |
|
| 593 |
# Sort by frequency in descending order
|
|
|
|
| 171 |
return array.to_csv().encode('utf-8')
|
| 172 |
|
| 173 |
dk_raw, fd_raw, dk_raw_sec, fd_raw_sec, roo_raw, timestamp, roo_backlog = load_overall_stats()
|
| 174 |
+
salary_dict = dict(zip(roo_raw.Player, roo_raw.Salary))
|
| 175 |
|
| 176 |
try:
|
| 177 |
dk_lineups = init_DK_lineups()
|
|
|
|
| 588 |
summary_df = pd.DataFrame({
|
| 589 |
'Player': value_counts.index,
|
| 590 |
'Frequency': value_counts.values,
|
| 591 |
+
'Percentage': percentages.values,
|
| 592 |
+
'Salary': [salary_dict.get(player, player) for player in value_counts.index]
|
| 593 |
})
|
| 594 |
|
| 595 |
# Sort by frequency in descending order
|