Spaces:
Running
Running
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
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 |
-
|
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]
|