jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.18k stars 322 forks source link

Add PitchingBot and Stuff+ stats to FG enum #342

Closed malerichc closed 10 months ago

malerichc commented 1 year ago

This resolves https://github.com/jldbc/pybaseball/issues/336.

This also makes this test pass again:

tests/integration/pybaseball/enums/fangraphs/test_pitching_data_enum.py

schorrm commented 1 year ago

LGTM.

educhaj commented 1 year ago

I might be dumb, but what is the syntax for pulling this data now? It's also possible I jumped the gun and this isn't live yet.

malerichc commented 1 year ago

@educhaj: This hasn't been merged in yet. If it is, they will just be extra columns returned with pitching_stats. For example:

from pybaseball import pitching_stats
season = 2022
df = pitching_stats(season)
print(df.head(3)[['Name', 'botERA', 'Stuff+']])

Output:

                Name  botERA  Stuff+
22        Aaron Nola    2.64     106
12      Carlos Rodon    2.86     114
0   Justin Verlander    3.34     118