pybaseball icon indicating copy to clipboard operation
pybaseball copied to clipboard

Shota Imanaga key_fangraphs value -1

Open themodfatherinc opened this issue 1 year ago • 2 comments

When pulling data on a list of pitchers I noticed this. His actual key is "33829".

Gathering player lookup table. This may take a moment. name_last name_first key_mlbam key_retro key_bbref key_fangraphs mlb_played_first mlb_played_last 0 imanaga shota 684007 imans001 imanash01 -1 2024.0 2024.0

themodfatherinc avatar Jun 24 '24 22:06 themodfatherinc

Same with Jackson Merrill

abroberts14 avatar Jun 27 '24 19:06 abroberts14

The source for this information is not fangraphs, it's chadwickbureau register repo. For Imanga the file is this one https://raw.githubusercontent.com/chadwickbureau/register/master/data/people-2.csv and the fangraphs key is null in the file.

In [9]: import pandas as pd

In [10]: f = "https://raw.githubusercontent.com/chadwickbureau/register/master/data/people-2.csv"

In [11]: df = pd.read_csv(f)
<ipython-input-11-8b84ba39746d>:1: DtypeWarning: Columns (9,10) have mixed types. Specify dtype option on import or set low_memory=False.
  df = pd.read_csv(f)

In [12]: df[df.name_last.str.contains("Imanaga")].T.head(7)
Out[12]: 
                                                 26563
key_person                                    2d8e2236
key_uuid          2d8e2236-267a-4f58-b6c2-4362eeafe99c
key_mlbam                                     684007.0
key_retro                                     imans001
key_bbref                                    imanash01
key_bbref_minors                          imanag000sho
key_fangraphs                                      NaN

bdilday avatar Jun 28 '24 12:06 bdilday