pitching_stats(year) not working for some seasons
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
I'll get an empty dataframe returned for 2013, 2014, and 2016 (print player_series). I'm relatively new to baseball and pybaseball, so I double checked that he played in those years and he most certainly did.
`gerrit_cole = pb.playerid_lookup('cole', 'gerrit')
gerrit_fg = gerrit_cole.iloc[0]['key_fangraphs']
first_season = int(gerrit_cole.iloc[0]['mlb_played_first'])
last_season = int(gerrit_cole.iloc[0]['mlb_played_last']) + 1
season_range = range(first_season, last_season)
columns = ['ERA-']
cole_df = pd.DataFrame(columns= columns)
for year in season_range:
print(year)
season_df = pb.pitching_stats(year)
player_series = season_df[season_df['Name'] == 'Gerrit Cole']
print(player_series)
`
Is there something I'm doing incorrectly here?
Contributor guide
Assessment
This issue has not been assessed yet.