rename columns
This commit is contained in:
parent
87cbc700ee
commit
220f210f75
1 changed files with 3 additions and 4 deletions
|
@ -108,12 +108,11 @@ def sort_players_by_num_games(games_dict):
|
||||||
nums[col] = num + 1
|
nums[col] = num + 1
|
||||||
return sorted(player_cols, key = lambda col: -nums[col])
|
return sorted(player_cols, key = lambda col: -nums[col])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
games = collect_player_games()
|
games = collect_player_games()
|
||||||
analysis = analyze_games(games)
|
analysis = analyze_games(games)
|
||||||
streaks = {}
|
streaks = {}
|
||||||
fieldnames = ['Replay Number', 'Seed Name', 'Player #', 'Result', 'BDR']
|
fieldnames = ['Game ID', 'Seed', 'Player #', 'Result', 'BDR']
|
||||||
fieldnames += sort_players_by_num_games(games)
|
fieldnames += sort_players_by_num_games(games)
|
||||||
fieldnames += ['Other']
|
fieldnames += ['Other']
|
||||||
|
|
||||||
|
@ -125,8 +124,8 @@ if __name__ == "__main__":
|
||||||
for game_id, entry in sorted(games.items()):
|
for game_id, entry in sorted(games.items()):
|
||||||
bdrs, termination = analysis[game_id]
|
bdrs, termination = analysis[game_id]
|
||||||
row = {
|
row = {
|
||||||
'Replay Number': "<a href='https://hanab.live/replay/{}'>{}</a>".format(entry.game_id, entry.game_id),
|
'Game ID': "<a href='https://hanab.live/replay/{}'>{}</a>".format(entry.game_id, entry.game_id),
|
||||||
'Seed Name': "<a href='https://hanab.live/seed/{}'>{}</a>".format(entry.seed, entry.seed),
|
'Seed': "<a href='https://hanab.live/seed/{}'>{}</a>".format(entry.seed, entry.seed),
|
||||||
'Player #': entry.num_players,
|
'Player #': entry.num_players,
|
||||||
'Result': 'Win' if entry.won else termination,
|
'Result': 'Win' if entry.won else termination,
|
||||||
'BDR': len(bdrs),
|
'BDR': len(bdrs),
|
||||||
|
|
Loading…
Reference in a new issue