James McCool commited on
Commit
78bf850
·
1 Parent(s): ce11442

Fix game number indexing in player summary generation by removing unnecessary conditional checks. This change simplifies the logic for retrieving game data, ensuring accurate player statistics are generated consistently across simulations.

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -598,10 +598,7 @@ if st.button("Run"):
598
 
599
  player_summary = pd.DataFrame()
600
  for game_num in range(game_count):
601
- if data_type == "Team":
602
- game_df = results_dict[f'game {game_num + 1}'] # Use correct dictionary key format
603
- else:
604
- game_df = results_dict[f'game {game_num}'] # Use correct dictionary key format
605
  # Remove 'game X' from playernames if present
606
  clean_df = game_df.copy()
607
  clean_df['playername'] = clean_df['playername'].str.split(' game ').str[0]
 
598
 
599
  player_summary = pd.DataFrame()
600
  for game_num in range(game_count):
601
+ game_df = results_dict[f'game {game_num + 1}'] # Use correct dictionary key format
 
 
 
602
  # Remove 'game X' from playernames if present
603
  clean_df = game_df.copy()
604
  clean_df['playername'] = clean_df['playername'].str.split(' game ').str[0]