James McCool
commited on
Commit
·
bc69eff
1
Parent(s):
0dedc97
Update contest data display and refine player ID mapping
Browse files- Increased the number of displayed contest entries from 10 to 100 in the app, enhancing user visibility of data.
- Commented out the player ID mapping logic in the grab_contest_data function to prevent potential issues while maintaining the original code for reference.
- These changes contribute to ongoing efforts to improve user experience and data handling within the application.
- app.py +1 -1
- global_func/grab_contest_data.py +1 -1
app.py
CHANGED
@@ -91,7 +91,7 @@ with tab1:
|
|
91 |
st.session_state['Contest'] = st.session_state['Contest'].reset_index(drop=True)
|
92 |
if st.session_state['Contest'] is not None:
|
93 |
st.success('Contest file loaded successfully!')
|
94 |
-
st.dataframe(st.session_state['Contest'].head(
|
95 |
|
96 |
if 'Contest_file' in st.session_state:
|
97 |
st.session_state['ownership_dict'] = dict(zip(st.session_state['ownership_df']['Player'], st.session_state['ownership_df']['Own']))
|
|
|
91 |
st.session_state['Contest'] = st.session_state['Contest'].reset_index(drop=True)
|
92 |
if st.session_state['Contest'] is not None:
|
93 |
st.success('Contest file loaded successfully!')
|
94 |
+
st.dataframe(st.session_state['Contest'].head(100))
|
95 |
|
96 |
if 'Contest_file' in st.session_state:
|
97 |
st.session_state['ownership_dict'] = dict(zip(st.session_state['ownership_df']['Player'], st.session_state['ownership_df']['Own']))
|
global_func/grab_contest_data.py
CHANGED
@@ -55,7 +55,7 @@ def grab_contest_data(sport, contest_name, contest_id_map, contest_date):
|
|
55 |
players_df = pd.DataFrame(player_data)
|
56 |
players_df = players_df.sort_values(by='ownership', ascending=False).reset_index(drop=True)
|
57 |
players_df = players_df.rename(columns={'fullName': 'Player', 'rosterPosition': 'Roster Position', 'ownership': '%Drafted', 'actualPoints': 'FPTS', 'salary': 'Salary', 'currentTeam': 'Team'})
|
58 |
-
pid_map = dict(zip(players_df['playerId'].astype(str), players_df['Player']))
|
59 |
|
60 |
for lineup_hash, lineup_info in lineups_json['lineups'].items():
|
61 |
lineup_data.append({
|
|
|
55 |
players_df = pd.DataFrame(player_data)
|
56 |
players_df = players_df.sort_values(by='ownership', ascending=False).reset_index(drop=True)
|
57 |
players_df = players_df.rename(columns={'fullName': 'Player', 'rosterPosition': 'Roster Position', 'ownership': '%Drafted', 'actualPoints': 'FPTS', 'salary': 'Salary', 'currentTeam': 'Team'})
|
58 |
+
# pid_map = dict(zip(players_df['playerId'].astype(str), players_df['Player']))
|
59 |
|
60 |
for lineup_hash, lineup_info in lineups_json['lineups'].items():
|
61 |
lineup_data.append({
|