From 220f210f750b363e56b1065311fe0bae466bc446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 10 Nov 2023 12:03:01 +0100 Subject: [PATCH] rename columns --- get_sheet.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/get_sheet.py b/get_sheet.py index b68e4f3..4674427 100644 --- a/get_sheet.py +++ b/get_sheet.py @@ -108,12 +108,11 @@ def sort_players_by_num_games(games_dict): nums[col] = num + 1 return sorted(player_cols, key = lambda col: -nums[col]) - if __name__ == "__main__": games = collect_player_games() analysis = analyze_games(games) streaks = {} - fieldnames = ['Replay Number', 'Seed Name', 'Player #', 'Result', 'BDR'] + fieldnames = ['Game ID', 'Seed', 'Player #', 'Result', 'BDR'] fieldnames += sort_players_by_num_games(games) fieldnames += ['Other'] @@ -125,8 +124,8 @@ if __name__ == "__main__": for game_id, entry in sorted(games.items()): bdrs, termination = analysis[game_id] row = { - 'Replay Number': "{}".format(entry.game_id, entry.game_id), - 'Seed Name': "{}".format(entry.seed, entry.seed), + 'Game ID': "{}".format(entry.game_id, entry.game_id), + 'Seed': "{}".format(entry.seed, entry.seed), 'Player #': entry.num_players, 'Result': 'Win' if entry.won else termination, 'BDR': len(bdrs),