Spaces:
Running
Running
James McCool
commited on
Commit
·
a6e2b8d
1
Parent(s):
e67403e
Fix game number indexing in player summary generation in app.py. Updated the dictionary key format to correctly reference game numbers, ensuring accurate data retrieval for player statistics. This change improves the integrity of the player summary during simulations.
Browse files
app.py
CHANGED
@@ -355,7 +355,7 @@ if st.button("Run"):
|
|
355 |
|
356 |
player_summary = pd.DataFrame()
|
357 |
for game_num in range(game_count):
|
358 |
-
game_df = results_dict[f'game {game_num}'] # Use correct dictionary key format
|
359 |
# Remove 'game X' from playernames if present
|
360 |
clean_df = game_df.copy()
|
361 |
clean_df['playername'] = clean_df['playername'].str.split(' game ').str[0]
|
|
|
355 |
|
356 |
player_summary = pd.DataFrame()
|
357 |
for game_num in range(game_count):
|
358 |
+
game_df = results_dict[f'game {game_num + 1}'] # Use correct dictionary key format
|
359 |
# Remove 'game X' from playernames if present
|
360 |
clean_df = game_df.copy()
|
361 |
clean_df['playername'] = clean_df['playername'].str.split(' game ').str[0]
|