Multichem commited on
Commit
410c155
·
1 Parent(s): 9e30fe1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -119,6 +119,8 @@ def seasonlong_build(data_sample):
119
  season_long_table['fd_fantasy'] = data_sample.groupby(['Player', 'Team'], sort=False)['fd_fantasy'].transform('mean').astype(float)
120
  season_long_table = season_long_table.drop_duplicates(subset='Player')
121
 
 
 
122
 
123
  season_long_table = season_long_table.set_axis(['Player', 'Team', 'Position', 'TOI', 'Goals', 'Total Assists', 'First Assists', 'Second Assists', 'Total Points',
124
  'IPP', 'Shots', 'ixG', 'iCF', 'iFF', 'iSCF', 'iHDCF', 'Rush Attempts', 'Rebounds Created', 'PIM', 'Total Penalties',
@@ -299,7 +301,7 @@ with tab2:
299
  with col2:
300
  if split_var1_t2 == 'Specific Teams':
301
  display = st.container()
302
- gamelog_table = gamelog_table.sort_values(by='Fantasy', ascending=False)
303
  gamelog_table = gamelog_table[gamelog_table['Date'] >= low_date_t2]
304
  gamelog_table = gamelog_table[gamelog_table['Date'] <= high_date_t2]
305
  gamelog_table = gamelog_table[gamelog_table['TOI'] >= min_var1_t2[0]]
@@ -313,7 +315,7 @@ with tab2:
313
 
314
  elif split_var1_t2 == 'Specific Players':
315
  display = st.container()
316
- gamelog_table = gamelog_table.sort_values(by='Fantasy', ascending=False)
317
  gamelog_table = gamelog_table[gamelog_table['Date'] >= low_date_t2]
318
  gamelog_table = gamelog_table[gamelog_table['Date'] <= high_date_t2]
319
  gamelog_table = gamelog_table[gamelog_table['TOI'] >= min_var1_t2[0]]
 
119
  season_long_table['fd_fantasy'] = data_sample.groupby(['Player', 'Team'], sort=False)['fd_fantasy'].transform('mean').astype(float)
120
  season_long_table = season_long_table.drop_duplicates(subset='Player')
121
 
122
+ season_long_table = season_long_table.sort_values(by='dk_fantasy', ascending=False)
123
+
124
 
125
  season_long_table = season_long_table.set_axis(['Player', 'Team', 'Position', 'TOI', 'Goals', 'Total Assists', 'First Assists', 'Second Assists', 'Total Points',
126
  'IPP', 'Shots', 'ixG', 'iCF', 'iFF', 'iSCF', 'iHDCF', 'Rush Attempts', 'Rebounds Created', 'PIM', 'Total Penalties',
 
301
  with col2:
302
  if split_var1_t2 == 'Specific Teams':
303
  display = st.container()
304
+ gamelog_table = gamelog_table.sort_values(by='dk_fantasy', ascending=False)
305
  gamelog_table = gamelog_table[gamelog_table['Date'] >= low_date_t2]
306
  gamelog_table = gamelog_table[gamelog_table['Date'] <= high_date_t2]
307
  gamelog_table = gamelog_table[gamelog_table['TOI'] >= min_var1_t2[0]]
 
315
 
316
  elif split_var1_t2 == 'Specific Players':
317
  display = st.container()
318
+ gamelog_table = gamelog_table.sort_values(by='dk_fantasy', ascending=False)
319
  gamelog_table = gamelog_table[gamelog_table['Date'] >= low_date_t2]
320
  gamelog_table = gamelog_table[gamelog_table['Date'] <= high_date_t2]
321
  gamelog_table = gamelog_table[gamelog_table['TOI'] >= min_var1_t2[0]]