Spaces:
Running
Running
James McCool
commited on
Commit
·
64fdc53
1
Parent(s):
f374e83
Update column name for player ownership in app.py by renaming 'Own' to 'Own%', enhancing clarity in data presentation for player ROO display.
Browse files
app.py
CHANGED
@@ -75,6 +75,7 @@ def init_baselines():
|
|
75 |
|
76 |
sd_roo_data = player_frame.drop(columns=['_id'])
|
77 |
sd_roo_data['Salary'] = sd_roo_data['Salary'].astype(int)
|
|
|
78 |
|
79 |
collection = db["Scoring_Percentages"]
|
80 |
cursor = collection.find()
|
@@ -328,10 +329,10 @@ with tab2:
|
|
328 |
player_roo_disp = player_roo_disp.drop(columns=['Site', 'Slate', 'pos_group', 'timestamp', 'player_ID'])
|
329 |
elif slate_type_var2 == 'Showdown':
|
330 |
player_roo_disp = player_roo_disp.drop(columns=['site', 'slate', 'version', 'timestamp'])
|
331 |
-
|
332 |
if view_var == "Simple":
|
333 |
try:
|
334 |
-
player_roo_disp = player_roo_disp[['Player', 'Position', 'Salary', 'Median', 'Ceiling', 'Own']]
|
335 |
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True, hide_index=True)
|
336 |
except:
|
337 |
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True, hide_index=True)
|
|
|
75 |
|
76 |
sd_roo_data = player_frame.drop(columns=['_id'])
|
77 |
sd_roo_data['Salary'] = sd_roo_data['Salary'].astype(int)
|
78 |
+
sd_roo_data = sd_roo_data.rename(columns={'Own': 'Own%'})
|
79 |
|
80 |
collection = db["Scoring_Percentages"]
|
81 |
cursor = collection.find()
|
|
|
329 |
player_roo_disp = player_roo_disp.drop(columns=['Site', 'Slate', 'pos_group', 'timestamp', 'player_ID'])
|
330 |
elif slate_type_var2 == 'Showdown':
|
331 |
player_roo_disp = player_roo_disp.drop(columns=['site', 'slate', 'version', 'timestamp'])
|
332 |
+
|
333 |
if view_var == "Simple":
|
334 |
try:
|
335 |
+
player_roo_disp = player_roo_disp[['Player', 'Position', 'Salary', 'Median', 'Ceiling', 'Own%']]
|
336 |
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True, hide_index=True)
|
337 |
except:
|
338 |
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True, hide_index=True)
|