Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: baseball reference game logs #4

Merged
merged 2 commits into from
May 14, 2020
Merged

FEAT: baseball reference game logs #4

merged 2 commits into from
May 14, 2020

Conversation

reddigari
Copy link
Contributor

Retrieve batting or pitching logs from bbref for all games in a season.

>>> pybaseball.team_game_logs(2019, "ATL")

     Game        Date   Home  Opp    Rslt  PA  AB   R   H  2B  3B  ...  GDP  SB  CS     BA    OBP    SLG    OPS  LOB  NumPlayers  Thr           OppStart
0       1      Mar 28   True  PHI  L,4-10  36  30   4   7   1   0  ...    1   1   1  0.233  0.361  0.367  0.728    5          15    R         A.Nola(67)
1       2      Mar 30   True  PHI   L,6-8  40  36   6  10   2   1  ...    1   1   0  0.258  0.355  0.470  0.825    7          17    R      N.Pivetta(35)
2       3      Mar 31   True  PHI   L,1-5  36  29   1   4   0   0  ...    0   1   2  0.221  0.339  0.368  0.708    8          14    R      J.Arrieta(62)
3       4       Apr 1  False  CHC   W,8-0  43  36   8  12   3   0  ...    1   0   0  0.252  0.368  0.427  0.795   11          15    R    K.Hendricks(26)
4       5       Apr 3  False  CHC   W,6-4  39  30   6   8   1   0  ...    1   1   0  0.255  0.376  0.441  0.817    9          16    L       J.Lester(56)
5       6       Apr 4  False  CHC   W,9-4  42  34   9  13   4   0  ...    1   0   1  0.277  0.391  0.451  0.843    9          12    R      Y.Darvish(38)
>>> pybaseball.team_game_logs(2019, "ATL", "pitching")

     Game       Date   Home  Opp    Rslt    IP   H  ...  SH  SF  ROE  GDP  NumPlayers              Umpire                                       PitchersUsed
0       1     Mar 28   True  PHI  L,4-10   8.0   7  ...   0   0    0    0           5        Mike Winters  J.Teheran (99-52-L), S.Carle (99), W.Parsons (...
1       2     Mar 30   True  PHI   L,6-8   8.0   9  ...   0   0    0    0           6         Tim Timmons  B.Wilson (99-33), W.Parsons (1-L), J.Venters (...
2       3     Mar 31   True  PHI   L,1-5   8.0   5  ...   0   1    0    1           4           Rob Drake  K.Wright (99-46-L), M.Fried (2), S.Carle (2), ...
3       4      Apr 1  False  CHC   W,8-0   9.0   9  ...   0   0    1    3           5     Gary Cederstrom  S.Newcomb (99-49), W.Parsons (1-W), J.Biddle (...
4       5      Apr 3  False  CHC   W,6-4   9.0  12  ...   0   0    0    1           6       Marvin Hudson  J.Teheran (5-55), J.Venters (3-BSv), W.Parsons...
5       6      Apr 4  False  CHC   W,9-4   9.0   6  ...   0   0    0    0           4      Adrian Johnson  M.Fried (3-75-W), S.Carle (3), C.Sobotka (2), ...

@schorrm
Copy link
Owner

schorrm commented May 10, 2020

This is really great!
One question: do you think this is better as a pitching=True or "pitching"?

@schorrm
Copy link
Owner

schorrm commented May 14, 2020

I'm going to merge this in. I'm still curious if you think the API makes more sense as a bool or something.

@schorrm schorrm merged commit 1dbc039 into schorrm:master May 14, 2020
@reddigari
Copy link
Contributor Author

reddigari commented May 14, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants