Add player_id to ratings & flashback rename
This commit is contained in:
parent
b9e922acba
commit
eb49ded2d4
@ -459,7 +459,7 @@ async def post_calc_basic(token: str = Depends(oauth2_scheme)):
|
|||||||
raw_data['Rating'] = round(rank_series * 100)
|
raw_data['Rating'] = round(rank_series * 100)
|
||||||
|
|
||||||
output = raw_data[[
|
output = raw_data[[
|
||||||
'player_name', 'Rating', 'Contact R', 'Contact L', 'Power R', 'Power L', 'Vision', 'Speed',
|
'player_id', 'player_name', 'Rating', 'Contact R', 'Contact L', 'Power R', 'Power L', 'Vision', 'Speed',
|
||||||
'Steal', 'Reaction', 'Arm', 'Fielding', 'hand', 'cardset_name'
|
'Steal', 'Reaction', 'Arm', 'Fielding', 'hand', 'cardset_name'
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
|||||||
@ -358,8 +358,8 @@ async def post_calc_basic(token: str = Depends(oauth2_scheme)):
|
|||||||
raw_data['Rating'] = round(rank_series * 100)
|
raw_data['Rating'] = round(rank_series * 100)
|
||||||
|
|
||||||
output = raw_data[[
|
output = raw_data[[
|
||||||
'player_name', 'Rating', 'Control R', 'Control L', 'Stuff R', 'Stuff L', 'Stamina', 'Fielding', 'H/9', 'K/9',
|
'player_id', 'player_name', 'Rating', 'Control R', 'Control L', 'Stuff R', 'Stuff L', 'Stamina', 'Fielding',
|
||||||
'BB/9', 'HR/9', 'hand', 'cardset_name'
|
'H/9', 'K/9', 'BB/9', 'HR/9', 'hand', 'cardset_name'
|
||||||
]]
|
]]
|
||||||
|
|
||||||
csv_file = pd.DataFrame(output).to_csv(index=False)
|
csv_file = pd.DataFrame(output).to_csv(index=False)
|
||||||
|
|||||||
@ -357,7 +357,7 @@ async def get_team_lineup(team_id: int, difficulty_name: str, pitcher_name: str,
|
|||||||
player_names.append(x.player.p_name)
|
player_names.append(x.player.p_name)
|
||||||
break
|
break
|
||||||
|
|
||||||
elif difficulty_name in ['major-league', 'tens', 'hall-of-fame']:
|
elif difficulty_name in ['major-league', 'flashback', 'hall-of-fame']:
|
||||||
logging.debug(f'entering difficulty: {difficulty_name}')
|
logging.debug(f'entering difficulty: {difficulty_name}')
|
||||||
eligible_cards = get_scouting_dfs(legal_players, position)
|
eligible_cards = get_scouting_dfs(legal_players, position)
|
||||||
logging.debug(f'got dataframe:\n{eligible_cards}')
|
logging.debug(f'got dataframe:\n{eligible_cards}')
|
||||||
@ -687,7 +687,7 @@ async def get_team_record(team_id: int, season: int):
|
|||||||
'minor-league': copy.deepcopy(template),
|
'minor-league': copy.deepcopy(template),
|
||||||
'major-league': copy.deepcopy(template),
|
'major-league': copy.deepcopy(template),
|
||||||
'hall-of-fame': copy.deepcopy(template),
|
'hall-of-fame': copy.deepcopy(template),
|
||||||
'tens': copy.deepcopy(template)
|
'flashback': copy.deepcopy(template)
|
||||||
}
|
}
|
||||||
|
|
||||||
for game in all_games:
|
for game in all_games:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user