James McCool commited on
Commit
5716aaa
1 Parent(s): 24661d4

switched filtering of frame

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -412,21 +412,21 @@ with tab5:
412
 
413
  with df_hold_container.container():
414
  if prop_type_var == 'All Props':
 
 
 
 
 
 
415
  if game_select_var == 'Aggregate':
416
  sim_vars = ['NBA_GAME_PLAYER_POINTS', 'NBA_GAME_PLAYER_REBOUNDS', 'NBA_GAME_PLAYER_ASSISTS', 'NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS', 'NBA_GAME_PLAYER_POINTS_REBOUNDS', 'NBA_GAME_PLAYER_POINTS_ASSISTS', 'NBA_GAME_PLAYER_REBOUNDS_ASSISTS']
417
  elif game_select_var == 'Pick6':
418
  sim_vars = ['Points', 'Rebounds', 'Assists', 'Points + Assists + Rebounds', 'Points + Assists', 'Points + Rebounds', 'Assists + Rebounds']
419
  for prop in sim_vars:
420
-
421
- if game_select_var == 'Aggregate':
422
- prop_df_raw = prop_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
423
- elif game_select_var == 'Pick6':
424
- prop_df_raw = pick_frame[['Full_name', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
425
- prop_df_raw.rename(columns={"Full_name": "Player"}, inplace = True)
426
-
427
  for books in book_selections:
428
- prop_df = prop_df_raw.loc[prop_df_raw['book'] == books]
429
- prop_df = prop_df.loc[prop_df['prop_type'] == prop]
430
  prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
431
  st.table(prop_df)
432
  prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
 
412
 
413
  with df_hold_container.container():
414
  if prop_type_var == 'All Props':
415
+ if game_select_var == 'Aggregate':
416
+ prop_df_raw = prop_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
417
+ elif game_select_var == 'Pick6':
418
+ prop_df_raw = pick_frame[['Full_name', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
419
+ prop_df_raw.rename(columns={"Full_name": "Player"}, inplace = True)
420
+
421
  if game_select_var == 'Aggregate':
422
  sim_vars = ['NBA_GAME_PLAYER_POINTS', 'NBA_GAME_PLAYER_REBOUNDS', 'NBA_GAME_PLAYER_ASSISTS', 'NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS', 'NBA_GAME_PLAYER_POINTS_REBOUNDS', 'NBA_GAME_PLAYER_POINTS_ASSISTS', 'NBA_GAME_PLAYER_REBOUNDS_ASSISTS']
423
  elif game_select_var == 'Pick6':
424
  sim_vars = ['Points', 'Rebounds', 'Assists', 'Points + Assists + Rebounds', 'Points + Assists', 'Points + Rebounds', 'Assists + Rebounds']
425
  for prop in sim_vars:
426
+ prop_df = prop_df_raw.loc[prop_df_raw['prop_type'] == prop]
427
+
 
 
 
 
 
428
  for books in book_selections:
429
+ prop_df = prop_df.loc[prop_df['book'] == books]
 
430
  prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
431
  st.table(prop_df)
432
  prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)