pybaseball
pybaseball copied to clipboard
playerid_reverse_lookup does not return 2023 rookies when using fangraphs key type
This is my process
# returns 2023 season stats (dataframe includes the rookies when inspected)
fg = pb.fg_batting_data(2023, qual=0)
# create lookup table for all players in 2023
lookup = pb.playerid_reverse_lookup(fg['IDfg'], key_type='fangraphs')
# sort values by descending mlbam keys to show most recently called up players
lookup.sort_values(by=['key_mlbam'], ascending=False)
As shown in the image the players at the top are those who were called up late in the 2022 season. No 2023 debuting players are in the lookup table. I am using pybaseball version 2.2.5
Hi @sam-walsh it appears that this issue has been resolved, as players with 2023 debut now show up in the output of your code.