Open jack-kelly-12 opened 1 year ago
Is it the same error shown in #337? Can you write the error, pybaseball version number, python version, and OS?
Different error, but it was that same error before I manually changed the code like one fix told me to try. Now it returns data sometimes, but not the right data or not at all.
Pybaseball: 2.2.5 Python: 3.9.7 Windows 10
It's last then first for the first one:
In [11]: playerid_lookup("alonso","pete")
Out[11]:
name_last name_first key_mlbam key_retro key_bbref key_fangraphs mlb_played_first mlb_played_last
0 alonso pete 624413 alonp001 alonspe01 19251 2019.0 2023.0
I'm unable to replicate the other two examples. Are you running a bunch of these at the same time all at once?
No, running one at a time. My fault on the first example, I used your code here:
Any suggestions?
Trying to obtain a player's name by using "batter" playerID from the statcast table....
pb.playerid_reverse_lookup(666969)
KeyError: "None of [Index(['name_last', 'name_first', 'key_mlbam', 'key_retro', 'key_bbref',\n 'key_fangraphs', 'mlb_played_first', 'mlb_played_last'],\n dtype='object')] are in the [columns]"
I'm aware of the issues in the past few months with playerid_reverse_lookup() and playerid_lookup(), but I upgraded my pybaseball packages and am still having the issue. It is not returning the right data.